commit 17105328f64a822d875810087c3e6032274da773
parent 88705494ce4eb562b95bae16b826630e8772c0d0
Author: Nicolas Silva <nical@fastmail.com>
Date: Wed, 15 Oct 2025 20:22:45 +0000
Bug 1994178 - Apply DebugFlags::FORCE_INVALIDATION to the frame immediately. r=gfx-reviewers,lsalzman
Without this the change does not apply until the next scene build which happens rarely in wrench.
Differential Revision: https://phabricator.services.mozilla.com/D268535
Diffstat:
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/gfx/wr/webrender/src/debugger.rs b/gfx/wr/webrender/src/debugger.rs
@@ -248,6 +248,9 @@ async fn handle_request(
api.send_debug_cmd(
DebugCommand::SetFlags(flags)
);
+ api.send_debug_cmd(
+ DebugCommand::GenerateFrame
+ );
Ok(string_response(format!("flags = {:?}", flags)))
}
_ => {
diff --git a/gfx/wr/webrender/src/render_backend.rs b/gfx/wr/webrender/src/render_backend.rs
@@ -1155,6 +1155,9 @@ impl RenderBackend {
.cloned()
.collect();
for document_id in documents {
+ if let Some(doc) = self.documents.get_mut(&document_id) {
+ doc.frame_is_valid = false;
+ }
self.update_document(
document_id,
Vec::default(),
@@ -1274,6 +1277,9 @@ impl RenderBackend {
let force_invalidation = flags.contains(DebugFlags::FORCE_PICTURE_INVALIDATION);
if self.frame_config.force_invalidation != force_invalidation {
self.frame_config.force_invalidation = force_invalidation;
+ for doc in self.documents.values_mut() {
+ doc.scene.config.force_invalidation = force_invalidation;
+ }
self.update_frame_builder_config();
}
@@ -1535,7 +1541,7 @@ impl RenderBackend {
) -> bool {
let update_doc_start = zeitstempel::now();
- let requested_frame = render_frame;
+ let requested_frame = render_frame || self.frame_config.force_invalidation;
let requires_frame_build = self.requires_frame_build();
let doc = self.documents.get_mut(&document_id).unwrap();