From a48a892756dff4986a2590293a8dcb4793fcf85f Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 23 Jan 2018 17:20:23 -0500 Subject: [PATCH] Bug 1432635 - When advancing the test time, trigger a rendering flush to WR. r=sotaro MozReview-Commit-ID: UtqGoOnobm --HG-- extra : rebase_source : e3f3f135138014a4ed8c4bed23cca18c146995c1 --- gfx/layers/ipc/CompositorBridgeParent.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 9bdc80e0bca9..e897c8ccf84e 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -1288,6 +1288,8 @@ bool CompositorBridgeParent::SetTestSampleTime(const uint64_t& aId, const TimeStamp& aTime) { + MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread()); + if (aTime.IsNull()) { return false; } @@ -1295,6 +1297,11 @@ CompositorBridgeParent::SetTestSampleTime(const uint64_t& aId, mIsTesting = true; mTestTime = aTime; + if (mWrBridge) { + mWrBridge->FlushRendering(/*aIsSync*/ false); + return true; + } + bool testComposite = mCompositionManager && mCompositorScheduler->NeedsComposite();