Bug 1395497 - Regenerate JNI binding r=me draft
authorJames Willcox <snorp@snorp.net>
Wed, 27 Sep 2017 18:15:24 -0500
changeset 674935 1dcb6aea3bc094a2e303a121edcbfc09f1e803e8
parent 674934 b66f9dfebfc4ffdd2b4d6f360a22fc12c4adaa98
child 674936 eaf08f6eed2942e3a16f23e3b14b57627eb03dc7
push id82975
push userbmo:snorp@snorp.net
push dateWed, 04 Oct 2017 15:19:09 +0000
reviewersme
bugs1395497
milestone58.0a1
Bug 1395497 - Regenerate JNI binding r=me MozReview-Commit-ID: D1zqIMsH1fH
widget/android/GeneratedJNINatives.h
widget/android/GeneratedJNIWrappers.cpp
widget/android/GeneratedJNIWrappers.h
--- a/widget/android/GeneratedJNINatives.h
+++ b/widget/android/GeneratedJNINatives.h
@@ -349,31 +349,16 @@ const JNINativeMethod SurfaceTextureList
             ::template Wrap<&Impl::DisposeNative>),
 
     mozilla::jni::MakeNativeMethod<SurfaceTextureListener::OnFrameAvailable_t>(
             mozilla::jni::NativeStub<SurfaceTextureListener::OnFrameAvailable_t, Impl>
             ::template Wrap<&Impl::OnFrameAvailable>)
 };
 
 template<class Impl>
-class GeckoSurfaceTexture::Natives : public mozilla::jni::NativeImpl<GeckoSurfaceTexture, Impl>
-{
-public:
-    static const JNINativeMethod methods[1];
-};
-
-template<class Impl>
-const JNINativeMethod GeckoSurfaceTexture::Natives<Impl>::methods[] = {
-
-    mozilla::jni::MakeNativeMethod<GeckoSurfaceTexture::NativeAcquireTexture_t>(
-            mozilla::jni::NativeStub<GeckoSurfaceTexture::NativeAcquireTexture_t, Impl>
-            ::template Wrap<&Impl::NativeAcquireTexture>)
-};
-
-template<class Impl>
 class LayerView::Compositor::Natives : public mozilla::jni::NativeImpl<Compositor, Impl>
 {
 public:
     static const JNINativeMethod methods[14];
 };
 
 template<class Impl>
 const JNINativeMethod LayerView::Compositor::Natives<Impl>::methods[] = {
--- a/widget/android/GeneratedJNIWrappers.cpp
+++ b/widget/android/GeneratedJNIWrappers.cpp
@@ -1115,24 +1115,44 @@ constexpr char GeckoSurface::SetAvailabl
 auto GeckoSurface::SetAvailable(bool a0) const -> void
 {
     return mozilla::jni::Method<SetAvailable_t>::Call(GeckoSurface::mCtx, nullptr, a0);
 }
 
 const char GeckoSurfaceTexture::name[] =
         "org/mozilla/gecko/gfx/GeckoSurfaceTexture";
 
+constexpr char GeckoSurfaceTexture::AttachToGLContext_t::name[];
+constexpr char GeckoSurfaceTexture::AttachToGLContext_t::signature[];
+
+auto GeckoSurfaceTexture::AttachToGLContext(int64_t a0, int32_t a1) const -> nsresult
+{
+    nsresult rv = NS_OK;
+    mozilla::jni::Method<AttachToGLContext_t>::Call(GeckoSurfaceTexture::mCtx, &rv, a0, a1);
+    return rv;
+}
+
 constexpr char GeckoSurfaceTexture::DecrementUse_t::name[];
 constexpr char GeckoSurfaceTexture::DecrementUse_t::signature[];
 
 auto GeckoSurfaceTexture::DecrementUse() const -> void
 {
     return mozilla::jni::Method<DecrementUse_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
 }
 
+constexpr char GeckoSurfaceTexture::DetachFromGLContext_t::name[];
+constexpr char GeckoSurfaceTexture::DetachFromGLContext_t::signature[];
+
+auto GeckoSurfaceTexture::DetachFromGLContext() const -> nsresult
+{
+    nsresult rv = NS_OK;
+    mozilla::jni::Method<DetachFromGLContext_t>::Call(GeckoSurfaceTexture::mCtx, &rv);
+    return rv;
+}
+
 constexpr char GeckoSurfaceTexture::GetHandle_t::name[];
 constexpr char GeckoSurfaceTexture::GetHandle_t::signature[];
 
 auto GeckoSurfaceTexture::GetHandle() const -> int32_t
 {
     return mozilla::jni::Method<GetHandle_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
 }
 
@@ -1147,16 +1167,24 @@ auto GeckoSurfaceTexture::GetTexName() c
 constexpr char GeckoSurfaceTexture::IncrementUse_t::name[];
 constexpr char GeckoSurfaceTexture::IncrementUse_t::signature[];
 
 auto GeckoSurfaceTexture::IncrementUse() const -> void
 {
     return mozilla::jni::Method<IncrementUse_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
 }
 
+constexpr char GeckoSurfaceTexture::IsAttachedToGLContext_t::name[];
+constexpr char GeckoSurfaceTexture::IsAttachedToGLContext_t::signature[];
+
+auto GeckoSurfaceTexture::IsAttachedToGLContext(int64_t a0) const -> bool
+{
+    return mozilla::jni::Method<IsAttachedToGLContext_t>::Call(GeckoSurfaceTexture::mCtx, nullptr, a0);
+}
+
 constexpr char GeckoSurfaceTexture::IsSingleBuffer_t::name[];
 constexpr char GeckoSurfaceTexture::IsSingleBuffer_t::signature[];
 
 auto GeckoSurfaceTexture::IsSingleBuffer() const -> bool
 {
     return mozilla::jni::Method<IsSingleBuffer_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
 }
 
@@ -1171,19 +1199,16 @@ auto GeckoSurfaceTexture::IsSingleBuffer
 constexpr char GeckoSurfaceTexture::Lookup_t::name[];
 constexpr char GeckoSurfaceTexture::Lookup_t::signature[];
 
 auto GeckoSurfaceTexture::Lookup(int32_t a0) -> GeckoSurfaceTexture::LocalRef
 {
     return mozilla::jni::Method<Lookup_t>::Call(GeckoSurfaceTexture::Context(), nullptr, a0);
 }
 
-constexpr char GeckoSurfaceTexture::NativeAcquireTexture_t::name[];
-constexpr char GeckoSurfaceTexture::NativeAcquireTexture_t::signature[];
-
 constexpr char GeckoSurfaceTexture::ReleaseTexImage_t::name[];
 constexpr char GeckoSurfaceTexture::ReleaseTexImage_t::signature[];
 
 auto GeckoSurfaceTexture::ReleaseTexImage() const -> void
 {
     return mozilla::jni::Method<ReleaseTexImage_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
 }
 
--- a/widget/android/GeneratedJNIWrappers.h
+++ b/widget/android/GeneratedJNIWrappers.h
@@ -3459,16 +3459,37 @@ public:
 
 class GeckoSurfaceTexture : public mozilla::jni::ObjectBase<GeckoSurfaceTexture>
 {
 public:
     static const char name[];
 
     explicit GeckoSurfaceTexture(const Context& ctx) : ObjectBase<GeckoSurfaceTexture>(ctx) {}
 
+    struct AttachToGLContext_t {
+        typedef GeckoSurfaceTexture Owner;
+        typedef void ReturnType;
+        typedef void SetterType;
+        typedef mozilla::jni::Args<
+                int64_t,
+                int32_t> Args;
+        static constexpr char name[] = "attachToGLContext";
+        static constexpr char signature[] =
+                "(JI)V";
+        static const bool isStatic = false;
+        static const mozilla::jni::ExceptionMode exceptionMode =
+                mozilla::jni::ExceptionMode::NSRESULT;
+        static const mozilla::jni::CallingThread callingThread =
+                mozilla::jni::CallingThread::ANY;
+        static const mozilla::jni::DispatchTarget dispatchTarget =
+                mozilla::jni::DispatchTarget::CURRENT;
+    };
+
+    auto AttachToGLContext(int64_t, int32_t) const -> nsresult;
+
     struct DecrementUse_t {
         typedef GeckoSurfaceTexture Owner;
         typedef void ReturnType;
         typedef void SetterType;
         typedef mozilla::jni::Args<> Args;
         static constexpr char name[] = "decrementUse";
         static constexpr char signature[] =
                 "()V";
@@ -3478,16 +3499,35 @@ public:
         static const mozilla::jni::CallingThread callingThread =
                 mozilla::jni::CallingThread::ANY;
         static const mozilla::jni::DispatchTarget dispatchTarget =
                 mozilla::jni::DispatchTarget::CURRENT;
     };
 
     auto DecrementUse() const -> void;
 
+    struct DetachFromGLContext_t {
+        typedef GeckoSurfaceTexture Owner;
+        typedef void ReturnType;
+        typedef void SetterType;
+        typedef mozilla::jni::Args<> Args;
+        static constexpr char name[] = "detachFromGLContext";
+        static constexpr char signature[] =
+                "()V";
+        static const bool isStatic = false;
+        static const mozilla::jni::ExceptionMode exceptionMode =
+                mozilla::jni::ExceptionMode::NSRESULT;
+        static const mozilla::jni::CallingThread callingThread =
+                mozilla::jni::CallingThread::ANY;
+        static const mozilla::jni::DispatchTarget dispatchTarget =
+                mozilla::jni::DispatchTarget::CURRENT;
+    };
+
+    auto DetachFromGLContext() const -> nsresult;
+
     struct GetHandle_t {
         typedef GeckoSurfaceTexture Owner;
         typedef int32_t ReturnType;
         typedef int32_t SetterType;
         typedef mozilla::jni::Args<> Args;
         static constexpr char name[] = "getHandle";
         static constexpr char signature[] =
                 "()I";
@@ -3535,16 +3575,36 @@ public:
         static const mozilla::jni::CallingThread callingThread =
                 mozilla::jni::CallingThread::ANY;
         static const mozilla::jni::DispatchTarget dispatchTarget =
                 mozilla::jni::DispatchTarget::CURRENT;
     };
 
     auto IncrementUse() const -> void;
 
+    struct IsAttachedToGLContext_t {
+        typedef GeckoSurfaceTexture Owner;
+        typedef bool ReturnType;
+        typedef bool SetterType;
+        typedef mozilla::jni::Args<
+                int64_t> Args;
+        static constexpr char name[] = "isAttachedToGLContext";
+        static constexpr char signature[] =
+                "(J)Z";
+        static const bool isStatic = false;
+        static const mozilla::jni::ExceptionMode exceptionMode =
+                mozilla::jni::ExceptionMode::ABORT;
+        static const mozilla::jni::CallingThread callingThread =
+                mozilla::jni::CallingThread::ANY;
+        static const mozilla::jni::DispatchTarget dispatchTarget =
+                mozilla::jni::DispatchTarget::CURRENT;
+    };
+
+    auto IsAttachedToGLContext(int64_t) const -> bool;
+
     struct IsSingleBuffer_t {
         typedef GeckoSurfaceTexture Owner;
         typedef bool ReturnType;
         typedef bool SetterType;
         typedef mozilla::jni::Args<> Args;
         static constexpr char name[] = "isSingleBuffer";
         static constexpr char signature[] =
                 "()Z";
@@ -3593,33 +3653,16 @@ public:
         static const mozilla::jni::CallingThread callingThread =
                 mozilla::jni::CallingThread::ANY;
         static const mozilla::jni::DispatchTarget dispatchTarget =
                 mozilla::jni::DispatchTarget::CURRENT;
     };
 
     static auto Lookup(int32_t) -> GeckoSurfaceTexture::LocalRef;
 
-    struct NativeAcquireTexture_t {
-        typedef GeckoSurfaceTexture Owner;
-        typedef int32_t ReturnType;
-        typedef int32_t SetterType;
-        typedef mozilla::jni::Args<> Args;
-        static constexpr char name[] = "nativeAcquireTexture";
-        static constexpr char signature[] =
-                "()I";
-        static const bool isStatic = true;
-        static const mozilla::jni::ExceptionMode exceptionMode =
-                mozilla::jni::ExceptionMode::ABORT;
-        static const mozilla::jni::CallingThread callingThread =
-                mozilla::jni::CallingThread::ANY;
-        static const mozilla::jni::DispatchTarget dispatchTarget =
-                mozilla::jni::DispatchTarget::CURRENT;
-    };
-
     struct ReleaseTexImage_t {
         typedef GeckoSurfaceTexture Owner;
         typedef void ReturnType;
         typedef void SetterType;
         typedef mozilla::jni::Args<> Args;
         static constexpr char name[] = "releaseTexImage";
         static constexpr char signature[] =
                 "()V";
@@ -3651,17 +3694,16 @@ public:
                 mozilla::jni::DispatchTarget::CURRENT;
     };
 
     auto UpdateTexImage() const -> void;
 
     static const mozilla::jni::CallingThread callingThread =
             mozilla::jni::CallingThread::ANY;
 
-    template<class Impl> class Natives;
 };
 
 class LayerView : public mozilla::jni::ObjectBase<LayerView>
 {
 public:
     static const char name[];
 
     explicit LayerView(const Context& ctx) : ObjectBase<LayerView>(ctx) {}