Bug 1322650 - Update JNI bindings r=jchen
MozReview-Commit-ID: EjRjyY8BQxw
--- a/widget/android/GeneratedJNINatives.h
+++ b/widget/android/GeneratedJNINatives.h
@@ -343,16 +343,31 @@ template<class Impl>
const JNINativeMethod SurfaceTextureListener::Natives<Impl>::methods[] = {
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[7];
};
template<class Impl>
const JNINativeMethod LayerView::Compositor::Natives<Impl>::methods[] = {
--- a/widget/android/GeneratedJNIWrappers.cpp
+++ b/widget/android/GeneratedJNIWrappers.cpp
@@ -1141,16 +1141,116 @@ auto GeckoLayerClient::ClearColor() cons
return mozilla::jni::Field<ClearColor_t>::Get(GeckoLayerClient::mCtx, nullptr);
}
auto GeckoLayerClient::ClearColor(int32_t a0) const -> void
{
return mozilla::jni::Field<ClearColor_t>::Set(GeckoLayerClient::mCtx, nullptr, a0);
}
+const char GeckoSurface::name[] =
+ "org/mozilla/gecko/gfx/GeckoSurface";
+
+constexpr char GeckoSurface::New_t::name[];
+constexpr char GeckoSurface::New_t::signature[];
+
+auto GeckoSurface::New(mozilla::jni::Object::Param a0, GeckoSurface::LocalRef* a1) -> nsresult
+{
+ MOZ_ASSERT(a1);
+ nsresult rv = NS_OK;
+ *a1 = mozilla::jni::Constructor<New_t>::Call(GeckoSurface::Context(), &rv, a0);
+ return rv;
+}
+
+constexpr char GeckoSurface::GetAvailable_t::name[];
+constexpr char GeckoSurface::GetAvailable_t::signature[];
+
+auto GeckoSurface::GetAvailable() const -> bool
+{
+ return mozilla::jni::Method<GetAvailable_t>::Call(GeckoSurface::mCtx, nullptr);
+}
+
+constexpr char GeckoSurface::GetHandle_t::name[];
+constexpr char GeckoSurface::GetHandle_t::signature[];
+
+auto GeckoSurface::GetHandle() const -> int64_t
+{
+ return mozilla::jni::Method<GetHandle_t>::Call(GeckoSurface::mCtx, nullptr);
+}
+
+constexpr char GeckoSurface::SetAvailable_t::name[];
+constexpr char GeckoSurface::SetAvailable_t::signature[];
+
+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::GetHandle_t::name[];
+constexpr char GeckoSurfaceTexture::GetHandle_t::signature[];
+
+auto GeckoSurfaceTexture::GetHandle() const -> int64_t
+{
+ return mozilla::jni::Method<GetHandle_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
+}
+
+constexpr char GeckoSurfaceTexture::GetTexName_t::name[];
+constexpr char GeckoSurfaceTexture::GetTexName_t::signature[];
+
+auto GeckoSurfaceTexture::GetTexName() const -> int32_t
+{
+ return mozilla::jni::Method<GetTexName_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
+}
+
+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);
+}
+
+constexpr char GeckoSurfaceTexture::IsSingleBufferSupported_t::name[];
+constexpr char GeckoSurfaceTexture::IsSingleBufferSupported_t::signature[];
+
+auto GeckoSurfaceTexture::IsSingleBufferSupported() -> bool
+{
+ return mozilla::jni::Method<IsSingleBufferSupported_t>::Call(GeckoSurfaceTexture::Context(), nullptr);
+}
+
+constexpr char GeckoSurfaceTexture::Lookup_t::name[];
+constexpr char GeckoSurfaceTexture::Lookup_t::signature[];
+
+auto GeckoSurfaceTexture::Lookup(int64_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);
+}
+
+constexpr char GeckoSurfaceTexture::UpdateTexImage_t::name[];
+constexpr char GeckoSurfaceTexture::UpdateTexImage_t::signature[];
+
+auto GeckoSurfaceTexture::UpdateTexImage() const -> void
+{
+ return mozilla::jni::Method<UpdateTexImage_t>::Call(GeckoSurfaceTexture::mCtx, nullptr);
+}
+
const char ImmutableViewportMetrics::name[] =
"org/mozilla/gecko/gfx/ImmutableViewportMetrics";
constexpr char ImmutableViewportMetrics::New_t::name[];
constexpr char ImmutableViewportMetrics::New_t::signature[];
auto ImmutableViewportMetrics::New(float a0, float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8, float a9, int32_t a10, int32_t a11, float a12) -> ImmutableViewportMetrics::LocalRef
{
@@ -1581,16 +1681,35 @@ auto StackScroller::SViscousFluidScale(f
auto StackScroller::SViscousFluidScale(float a0) -> nsresult
{
nsresult rv = NS_OK;
mozilla::jni::Field<SViscousFluidScale_t>::Set(StackScroller::Context(), &rv, a0);
return rv;
}
+const char SurfaceAllocator::name[] =
+ "org/mozilla/gecko/gfx/SurfaceAllocator";
+
+constexpr char SurfaceAllocator::AcquireSurface_t::name[];
+constexpr char SurfaceAllocator::AcquireSurface_t::signature[];
+
+auto SurfaceAllocator::AcquireSurface(int32_t a0, int32_t a1, bool a2) -> mozilla::jni::Object::LocalRef
+{
+ return mozilla::jni::Method<AcquireSurface_t>::Call(SurfaceAllocator::Context(), nullptr, a0, a1, a2);
+}
+
+constexpr char SurfaceAllocator::DisposeSurface_t::name[];
+constexpr char SurfaceAllocator::DisposeSurface_t::signature[];
+
+auto SurfaceAllocator::DisposeSurface(mozilla::jni::Object::Param a0) -> void
+{
+ return mozilla::jni::Method<DisposeSurface_t>::Call(SurfaceAllocator::Context(), nullptr, a0);
+}
+
const char ViewTransform::name[] =
"org/mozilla/gecko/gfx/ViewTransform";
constexpr char ViewTransform::New_t::name[];
constexpr char ViewTransform::New_t::signature[];
auto ViewTransform::New(float a0, float a1, float a2) -> ViewTransform::LocalRef
{
--- a/widget/android/GeneratedJNIWrappers.h
+++ b/widget/android/GeneratedJNIWrappers.h
@@ -3537,16 +3537,270 @@ public:
auto ClearColor(int32_t) const -> void;
static const mozilla::jni::CallingThread callingThread =
mozilla::jni::CallingThread::ANY;
};
+class GeckoSurface : public mozilla::jni::ObjectBase<GeckoSurface>
+{
+public:
+ static const char name[];
+
+ explicit GeckoSurface(const Context& ctx) : ObjectBase<GeckoSurface>(ctx) {}
+
+ struct New_t {
+ typedef GeckoSurface Owner;
+ typedef GeckoSurface::LocalRef ReturnType;
+ typedef GeckoSurface::Param SetterType;
+ typedef mozilla::jni::Args<
+ mozilla::jni::Object::Param> Args;
+ static constexpr char name[] = "<init>";
+ static constexpr char signature[] =
+ "(Lorg/mozilla/gecko/gfx/GeckoSurfaceTexture;)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;
+ };
+
+ static auto New(mozilla::jni::Object::Param, GeckoSurface::LocalRef*) -> nsresult;
+
+ struct GetAvailable_t {
+ typedef GeckoSurface Owner;
+ typedef bool ReturnType;
+ typedef bool SetterType;
+ typedef mozilla::jni::Args<> Args;
+ static constexpr char name[] = "getAvailable";
+ static constexpr char signature[] =
+ "()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 GetAvailable() const -> bool;
+
+ struct GetHandle_t {
+ typedef GeckoSurface Owner;
+ typedef int64_t ReturnType;
+ typedef int64_t SetterType;
+ typedef mozilla::jni::Args<> Args;
+ static constexpr char name[] = "getHandle";
+ static constexpr char signature[] =
+ "()J";
+ 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 GetHandle() const -> int64_t;
+
+ struct SetAvailable_t {
+ typedef GeckoSurface Owner;
+ typedef void ReturnType;
+ typedef void SetterType;
+ typedef mozilla::jni::Args<
+ bool> Args;
+ static constexpr char name[] = "setAvailable";
+ static constexpr char signature[] =
+ "(Z)V";
+ 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 SetAvailable(bool) const -> void;
+
+ static const mozilla::jni::CallingThread callingThread =
+ mozilla::jni::CallingThread::ANY;
+
+};
+
+class GeckoSurfaceTexture : public mozilla::jni::ObjectBase<GeckoSurfaceTexture>
+{
+public:
+ static const char name[];
+
+ explicit GeckoSurfaceTexture(const Context& ctx) : ObjectBase<GeckoSurfaceTexture>(ctx) {}
+
+ struct GetHandle_t {
+ typedef GeckoSurfaceTexture Owner;
+ typedef int64_t ReturnType;
+ typedef int64_t SetterType;
+ typedef mozilla::jni::Args<> Args;
+ static constexpr char name[] = "getHandle";
+ static constexpr char signature[] =
+ "()J";
+ 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 GetHandle() const -> int64_t;
+
+ struct GetTexName_t {
+ typedef GeckoSurfaceTexture Owner;
+ typedef int32_t ReturnType;
+ typedef int32_t SetterType;
+ typedef mozilla::jni::Args<> Args;
+ static constexpr char name[] = "getTexName";
+ static constexpr char signature[] =
+ "()I";
+ 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 GetTexName() const -> int32_t;
+
+ 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";
+ 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 IsSingleBuffer() const -> bool;
+
+ struct IsSingleBufferSupported_t {
+ typedef GeckoSurfaceTexture Owner;
+ typedef bool ReturnType;
+ typedef bool SetterType;
+ typedef mozilla::jni::Args<> Args;
+ static constexpr char name[] = "isSingleBufferSupported";
+ static constexpr char signature[] =
+ "()Z";
+ 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;
+ };
+
+ static auto IsSingleBufferSupported() -> bool;
+
+ struct Lookup_t {
+ typedef GeckoSurfaceTexture Owner;
+ typedef GeckoSurfaceTexture::LocalRef ReturnType;
+ typedef GeckoSurfaceTexture::Param SetterType;
+ typedef mozilla::jni::Args<
+ int64_t> Args;
+ static constexpr char name[] = "lookup";
+ static constexpr char signature[] =
+ "(J)Lorg/mozilla/gecko/gfx/GeckoSurfaceTexture;";
+ 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;
+ };
+
+ static auto Lookup(int64_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";
+ 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 ReleaseTexImage() const -> void;
+
+ struct UpdateTexImage_t {
+ typedef GeckoSurfaceTexture Owner;
+ typedef void ReturnType;
+ typedef void SetterType;
+ typedef mozilla::jni::Args<> Args;
+ static constexpr char name[] = "updateTexImage";
+ static constexpr char signature[] =
+ "()V";
+ 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 UpdateTexImage() const -> void;
+
+ static const mozilla::jni::CallingThread callingThread =
+ mozilla::jni::CallingThread::ANY;
+
+ template<class Impl> class Natives;
+};
+
class ImmutableViewportMetrics : public mozilla::jni::ObjectBase<ImmutableViewportMetrics>
{
public:
static const char name[];
explicit ImmutableViewportMetrics(const Context& ctx) : ObjectBase<ImmutableViewportMetrics>(ctx) {}
struct New_t {
@@ -4650,16 +4904,70 @@ public:
static auto SViscousFluidScale(float) -> nsresult;
static const mozilla::jni::CallingThread callingThread =
mozilla::jni::CallingThread::ANY;
};
+class SurfaceAllocator : public mozilla::jni::ObjectBase<SurfaceAllocator>
+{
+public:
+ static const char name[];
+
+ explicit SurfaceAllocator(const Context& ctx) : ObjectBase<SurfaceAllocator>(ctx) {}
+
+ struct AcquireSurface_t {
+ typedef SurfaceAllocator Owner;
+ typedef mozilla::jni::Object::LocalRef ReturnType;
+ typedef mozilla::jni::Object::Param SetterType;
+ typedef mozilla::jni::Args<
+ int32_t,
+ int32_t,
+ bool> Args;
+ static constexpr char name[] = "acquireSurface";
+ static constexpr char signature[] =
+ "(IIZ)Lorg/mozilla/gecko/gfx/GeckoSurface;";
+ 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;
+ };
+
+ static auto AcquireSurface(int32_t, int32_t, bool) -> mozilla::jni::Object::LocalRef;
+
+ struct DisposeSurface_t {
+ typedef SurfaceAllocator Owner;
+ typedef void ReturnType;
+ typedef void SetterType;
+ typedef mozilla::jni::Args<
+ mozilla::jni::Object::Param> Args;
+ static constexpr char name[] = "disposeSurface";
+ static constexpr char signature[] =
+ "(Lorg/mozilla/gecko/gfx/GeckoSurface;)V";
+ 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;
+ };
+
+ static auto DisposeSurface(mozilla::jni::Object::Param) -> void;
+
+ static const mozilla::jni::CallingThread callingThread =
+ mozilla::jni::CallingThread::ANY;
+
+};
+
class ViewTransform : public mozilla::jni::ObjectBase<ViewTransform>
{
public:
static const char name[];
explicit ViewTransform(const Context& ctx) : ObjectBase<ViewTransform>(ctx) {}
struct New_t {