Bug 1435282 - Make SetTestSampleTime force a sync flush. r?sotaro
SetTestSampleTime is called from tests via the advanceTimeAndRefresh API
on DOMWindowUtils, and the expectation is that after it is done, the
time has been advanced and a composite has happened. So we need to
ensure that is the case with WebRender as well. This fixes the issue I
was seeing with test_group_hittest.html and makes it pass.
MozReview-Commit-ID: 86l9mTTwD2v
--- a/gfx/layers/apz/test/mochitest/mochitest.ini
+++ b/gfx/layers/apz/test/mochitest/mochitest.ini
@@ -77,9 +77,9 @@
skip-if = (toolkit == 'android') || (toolkit == 'cocoa') # wheel events not supported on mobile, and synthesized wheel smooth-scrolling not supported on OS X
[test_wheel_scroll.html]
skip-if = (os == 'android') # wheel events not supported on mobile
[test_wheel_transactions.html]
skip-if = (toolkit == 'android') || webrender # wheel events not supported on mobile; bug 1429521 for webrender
[test_group_overrides.html]
skip-if = (toolkit == 'android') || webrender # wheel events not supported on mobile; bug 1429521 for webrender
[test_group_hittest.html]
- skip-if = (toolkit == 'android') || webrender # mouse events not supported on mobile; bug 1429521 for webrender
+ skip-if = (toolkit == 'android') # mouse events not supported on mobile
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1282,17 +1282,17 @@ CompositorBridgeParent::SetTestSampleTim
if (aTime.IsNull()) {
return false;
}
mTestTime = Some(aTime);
if (mWrBridge) {
- mWrBridge->FlushRenderingAsync();
+ mWrBridge->FlushRendering();
return true;
}
bool testComposite = mCompositionManager &&
mCompositorScheduler->NeedsComposite();
// Update but only if we were already scheduled to animate
if (testComposite) {