diff --git a/gfx/layers/NativeLayerWayland.h b/gfx/layers/NativeLayerWayland.h --- a/gfx/layers/NativeLayerWayland.h +++ b/gfx/layers/NativeLayerWayland.h @@ -80,22 +80,26 @@ bool CommitToScreen(const MutexAutoLock& aProofOfLock); Mutex mMutex MOZ_UNANNOTATED; MozContainer* mContainer = nullptr; +#if 0 wl_surface* mWlSurface = nullptr; +#endif RefPtr mShmBuffer; nsTArray> mSublayers; nsTArray> mOldSublayers; nsTArray> mSublayersOnMainThread; bool mNewLayers = false; bool mFrameInProcess = false; +#if 0 bool mCallbackRequested = false; gulong mGdkAfterPaintId = 0; +#endif RefPtr mCallbackMultiplexHelper; }; class NativeLayerWayland final : public NativeLayer { public: diff --git a/gfx/layers/NativeLayerWayland.cpp b/gfx/layers/NativeLayerWayland.cpp --- a/gfx/layers/NativeLayerWayland.cpp +++ b/gfx/layers/NativeLayerWayland.cpp @@ -146,10 +146,11 @@ } bool NativeLayerRootWayland::CommitToScreen(const MutexAutoLock& aProofOfLock) { mFrameInProcess = false; +#if 0 MozContainerSurfaceLock lock(mContainer); struct wl_surface* containerSurface = lock.GetSurface(); if (!containerSurface) { if (!mCallbackRequested) { RefPtr self(this); @@ -238,11 +239,11 @@ mShmBuffer->AttachAndCommit(containerSurface); mWlSurface = containerSurface; } else { wl_surface_commit(containerSurface); } - +#endif wl_display_flush(widget::WaylandDisplayGet()->GetDisplay()); return true; } void NativeLayerRootWayland::RequestFrameCallback(CallbackFunc aCallbackFunc, @@ -253,37 +254,43 @@ new CallbackMultiplexHelper(aCallbackFunc, aCallbackData); for (const RefPtr& layer : mSublayersOnMainThread) { layer->RequestFrameCallback(mCallbackMultiplexHelper); } - +#if 0 MozContainerSurfaceLock lockContainer(mContainer); struct wl_surface* wlSurface = lockContainer.GetSurface(); if (wlSurface) { wl_surface_commit(wlSurface); wl_display_flush(widget::WaylandDisplayGet()->GetDisplay()); } +#endif } +#if 0 static void sAfterFrameClockAfterPaint( GdkFrameClock* aClock, NativeLayerRootWayland* aNativeLayerRoot) { aNativeLayerRoot->AfterFrameClockAfterPaint(); } +#endif void NativeLayerRootWayland::AfterFrameClockAfterPaint() { MutexAutoLock lock(mMutex); +#if 0 MozContainerSurfaceLock lockContainer(mContainer); struct wl_surface* containerSurface = lockContainer.GetSurface(); for (const RefPtr& layer : mSublayersOnMainThread) { wl_surface_commit(layer->mWlSurface); } if (containerSurface) { wl_surface_commit(containerSurface); } +#endif } void NativeLayerRootWayland::UpdateLayersOnMainThread() { +#if 0 AssertIsOnMainThread(); MutexAutoLock lock(mMutex); static auto sGdkWaylandWindowAddCallbackSurface = (void (*)(GdkWindow*, struct wl_surface*))dlsym( @@ -345,10 +352,11 @@ GdkFrameClock* frameClock = gdk_window_get_frame_clock(gdkWindow); mGdkAfterPaintId = g_signal_connect_after(frameClock, "after-paint", G_CALLBACK(sAfterFrameClockAfterPaint), this); } +#endif } NativeLayerWayland::NativeLayerWayland( const IntSize& aSize, bool aIsOpaque, SurfacePoolHandleWayland* aSurfacePoolHandle) @@ -594,10 +602,11 @@ } void NativeLayerWayland::DiscardBackbuffers() {} void NativeLayerWayland::Commit() { +#if 0 MutexAutoLock lock(mMutex); if (mDirtyRegion.IsEmpty() && mHasBufferAttached) { wl_surface_commit(mWlSurface); return; @@ -610,10 +619,11 @@ MOZ_ASSERT(mFrontBuffer); mFrontBuffer->AttachAndCommit(mWlSurface); mHasBufferAttached = true; mDirtyRegion.SetEmpty(); +#endif } void NativeLayerWayland::Unmap() { MutexAutoLock lock(mMutex); diff --git a/gfx/layers/SurfacePoolWayland.cpp b/gfx/layers/SurfacePoolWayland.cpp --- a/gfx/layers/SurfacePoolWayland.cpp +++ b/gfx/layers/SurfacePoolWayland.cpp @@ -81,12 +81,14 @@ return buffer; } RefPtr buffer; if (aGL) { +#if 0 buffer = widget::WaylandBufferDMABUF::Create( LayoutDeviceIntSize::FromUnknownSize(aSize), aGL); +#endif } else { buffer = widget::WaylandBufferSHM::Create( LayoutDeviceIntSize::FromUnknownSize(aSize)); } if (buffer) {