From 91a9c48755365f05fe645a0d8104471204b2ad28 Mon Sep 17 00:00:00 2001 From: James Willcox Date: Wed, 27 Sep 2017 18:15:24 -0500 Subject: [PATCH] Bug 1395497 - Regenerate JNI binding r=me MozReview-Commit-ID: D1zqIMsH1fH --- widget/android/GeneratedJNINatives.h | 15 ----- widget/android/GeneratedJNIWrappers.cpp | 31 +++++++++- widget/android/GeneratedJNIWrappers.h | 78 +++++++++++++++++++------ 3 files changed, 88 insertions(+), 36 deletions(-) diff --git a/widget/android/GeneratedJNINatives.h b/widget/android/GeneratedJNINatives.h index ca17db3608d7..df60f23fb2d9 100644 --- a/widget/android/GeneratedJNINatives.h +++ b/widget/android/GeneratedJNINatives.h @@ -353,21 +353,6 @@ const JNINativeMethod SurfaceTextureListener::Natives::methods[] = { ::template Wrap<&Impl::OnFrameAvailable>) }; -template -class GeckoSurfaceTexture::Natives : public mozilla::jni::NativeImpl -{ -public: - static const JNINativeMethod methods[1]; -}; - -template -const JNINativeMethod GeckoSurfaceTexture::Natives::methods[] = { - - mozilla::jni::MakeNativeMethod( - mozilla::jni::NativeStub - ::template Wrap<&Impl::NativeAcquireTexture>) -}; - template class LayerView::Compositor::Natives : public mozilla::jni::NativeImpl { diff --git a/widget/android/GeneratedJNIWrappers.cpp b/widget/android/GeneratedJNIWrappers.cpp index eeec245ea9bb..003346d9ab22 100644 --- a/widget/android/GeneratedJNIWrappers.cpp +++ b/widget/android/GeneratedJNIWrappers.cpp @@ -1120,6 +1120,16 @@ auto GeckoSurface::SetAvailable(bool a0) const -> void 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::Call(GeckoSurfaceTexture::mCtx, &rv, a0, a1); + return rv; +} + constexpr char GeckoSurfaceTexture::DecrementUse_t::name[]; constexpr char GeckoSurfaceTexture::DecrementUse_t::signature[]; @@ -1128,6 +1138,16 @@ auto GeckoSurfaceTexture::DecrementUse() const -> void return mozilla::jni::Method::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::Call(GeckoSurfaceTexture::mCtx, &rv); + return rv; +} + constexpr char GeckoSurfaceTexture::GetHandle_t::name[]; constexpr char GeckoSurfaceTexture::GetHandle_t::signature[]; @@ -1152,6 +1172,14 @@ auto GeckoSurfaceTexture::IncrementUse() const -> void return mozilla::jni::Method::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::Call(GeckoSurfaceTexture::mCtx, nullptr, a0); +} + constexpr char GeckoSurfaceTexture::IsSingleBuffer_t::name[]; constexpr char GeckoSurfaceTexture::IsSingleBuffer_t::signature[]; @@ -1176,9 +1204,6 @@ auto GeckoSurfaceTexture::Lookup(int32_t a0) -> GeckoSurfaceTexture::LocalRef return mozilla::jni::Method::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[]; diff --git a/widget/android/GeneratedJNIWrappers.h b/widget/android/GeneratedJNIWrappers.h index 70e39cddabfd..06b47fd20035 100644 --- a/widget/android/GeneratedJNIWrappers.h +++ b/widget/android/GeneratedJNIWrappers.h @@ -3460,6 +3460,27 @@ public: explicit GeckoSurfaceTexture(const Context& ctx) : ObjectBase(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; @@ -3479,6 +3500,25 @@ public: 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; @@ -3536,6 +3576,26 @@ public: 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; @@ -3594,23 +3654,6 @@ public: 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; @@ -3652,7 +3695,6 @@ public: static const mozilla::jni::CallingThread callingThread = mozilla::jni::CallingThread::ANY; - template class Natives; }; class LayerView : public mozilla::jni::ObjectBase