diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index f246166a253a..336669a2d0c1 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -1410,6 +1410,12 @@ LayerManagerComposite::AsyncPanZoomEnabled() const return false; } +bool +LayerManagerComposite::AlwaysScheduleComposite() const +{ + return !!(mCompositor->GetDiagnosticTypes() & DiagnosticTypes::FLASH_BORDERS); +} + nsIntRegion LayerComposite::GetFullyRenderedRegion() { if (TiledContentHost* tiled = GetCompositableHost() ? GetCompositableHost()->AsTiledContentHost() diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index 16b0c54b0c37..6a65dde3ae87 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -164,6 +164,10 @@ public: void SetPaintTime(const TimeDuration& aPaintTime) { mLastPaintTime = aPaintTime; } + virtual bool AlwaysScheduleComposite() const { + return false; + } + TimeStamp GetCompositionTime() const { return mCompositionTime; } @@ -279,6 +283,8 @@ public: virtual const char* Name() const override { return ""; } + bool AlwaysScheduleComposite() const override; + /** * Post-processes layers before composition. This performs the following: * diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index e394f86752d6..bab04ae78e3d 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -1034,8 +1034,9 @@ CompositorBridgeParent::CompositeToTarget(DrawTarget* aTarget, const gfx::IntRec #endif // 0 -> Full-tilt composite - if (gfxPrefs::LayersCompositionFrameRate() == 0 - || mLayerManager->GetCompositor()->GetDiagnosticTypes() & DiagnosticTypes::FLASH_BORDERS) { + if (gfxPrefs::LayersCompositionFrameRate() == 0 || + mLayerManager->AlwaysScheduleComposite()) + { // Special full-tilt composite mode for performance testing ScheduleComposition(); }