From d46f7366f0d4aa6b612b9c7a004b28e41c0984e4 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Thu, 15 Jul 2021 08:56:20 +0000 Subject: [PATCH] Bug 1719668 - Do not force XFlush() on XRender r=jrmuizel,nical Differential Revision: https://phabricator.services.mozilla.com/D119557 --- gfx/layers/ipc/ShadowLayers.cpp | 7 ------- gfx/thebes/gfxPlatform.h | 2 -- gfx/thebes/gfxPlatformGtk.cpp | 6 ------ gfx/thebes/gfxPlatformGtk.h | 5 ----- 4 files changed, 20 deletions(-) diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index 9c36e6462510..fa3868c982c7 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -586,13 +586,6 @@ bool ShadowLayerForwarder::EndTransaction( return true; } - if (!mTxn->mPaints.IsEmpty()) { - // With some platforms, telling the drawing backend that there will be no - // more drawing for this frame helps with preventing command queues from - // spanning across multiple frames. - gfxPlatform::GetPlatform()->FlushContentDrawing(); - } - MOZ_LAYERS_LOG(("[LayersForwarder] destroying buffers...")); MOZ_LAYERS_LOG(("[LayersForwarder] building transaction...")); diff --git a/gfx/thebes/gfxPlatform.h b/gfx/thebes/gfxPlatform.h index c290bf237e85..cd2a875ef1d1 100644 --- a/gfx/thebes/gfxPlatform.h +++ b/gfx/thebes/gfxPlatform.h @@ -735,8 +735,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener { bool SupportsApzAutoscrolling() const; bool SupportsApzZooming() const; - virtual void FlushContentDrawing() {} - // If a device reset has occurred, schedule any necessary paints in the // widget. This should only be used within nsRefreshDriver. virtual void SchedulePaintIfDeviceReset() {} diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp index d976007608df..b4f9ab398461 100644 --- a/gfx/thebes/gfxPlatformGtk.cpp +++ b/gfx/thebes/gfxPlatformGtk.cpp @@ -258,12 +258,6 @@ void gfxPlatformGtk::InitWebRenderConfig() { gfxVars::SetUseWebRenderCompositor(feature.IsEnabled()); } -void gfxPlatformGtk::FlushContentDrawing() { - if (gfxVars::UseXRender()) { - XFlush(DefaultXDisplay()); - } -} - void gfxPlatformGtk::InitPlatformGPUProcessPrefs() { #ifdef MOZ_WAYLAND if (IsWaylandDisplay()) { diff --git a/gfx/thebes/gfxPlatformGtk.h b/gfx/thebes/gfxPlatformGtk.h index d826315f7abf..5ebbcab48485 100644 --- a/gfx/thebes/gfxPlatformGtk.h +++ b/gfx/thebes/gfxPlatformGtk.h @@ -39,11 +39,6 @@ class gfxPlatformGtk final : public gfxPlatform { bool CreatePlatformFontList() override; - /** - * Calls XFlush if xrender is enabled. - */ - void FlushContentDrawing() override; - static int32_t GetFontScaleDPI(); static double GetFontScaleFactor();