summaryrefslogtreecommitdiffstats
path: root/gfx/layers/wr/WebRenderBridgeParent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/wr/WebRenderBridgeParent.cpp')
-rw-r--r--gfx/layers/wr/WebRenderBridgeParent.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/gfx/layers/wr/WebRenderBridgeParent.cpp b/gfx/layers/wr/WebRenderBridgeParent.cpp
index 83139b6af6..68e0c7af8c 100644
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -1919,6 +1919,10 @@ mozilla::ipc::IPCResult WebRenderBridgeParent::RecvClearCachedResources() {
wr::AsUint64(mPipelineId), wr::AsUint64(mApi->GetId()),
IsRootWebRenderBridgeParent());
+ if (!IsRootWebRenderBridgeParent()) {
+ mApi->FlushPendingWrTransactionEventsWithoutWait();
+ }
+
// Clear resources
wr::TransactionBuilder txn(mApi);
txn.SetLowPriority(true);
@@ -2618,17 +2622,17 @@ void WebRenderBridgeParent::ScheduleGenerateFrame(wr::RenderReasons aReasons) {
}
void WebRenderBridgeParent::FlushRendering(wr::RenderReasons aReasons,
- bool aWaitForPresent) {
+ bool aBlocking) {
if (mDestroyed) {
return;
}
- // This gets called during e.g. window resizes, so we need to flush the
- // scene (which has the display list at the new window size).
- FlushSceneBuilds();
- FlushFrameGeneration(aReasons);
- if (aWaitForPresent) {
+ if (aBlocking) {
+ FlushSceneBuilds();
+ FlushFrameGeneration(aReasons);
FlushFramePresentation();
+ } else {
+ ScheduleGenerateFrame(aReasons);
}
}