Bug 1892678. Rename pref image.decode-sync.enabled to image.testing.decode-sync.enabled. r=gfx-reviewers,nical

The reason I want to rename this so that it is clear that it is intended for tests only is for bug 1866411. If we see that this pref is set then we can assume that it isn't being flipped during the loading of images, and therefore we can avoid the extra invalidates that sync decode paints would normally incur.

Differential Revision: https://phabricator.services.mozilla.com/D208111
This commit is contained in:
Timothy Nikkel
2024-04-24 01:57:41 +00:00
parent fdabe9b81b
commit 8ac1db6c96
5 changed files with 6 additions and 6 deletions

View File

@@ -6566,7 +6566,7 @@ void PresShell::PaintInternal(nsView* aViewToPaint, PaintInternalFlags aFlags) {
// We also force sync-decoding via pref for reftests.
if (aFlags & PaintInternalFlags::PaintSyncDecodeImages ||
mDocument->IsStaticDocument() ||
StaticPrefs::image_decode_sync_enabled()) {
StaticPrefs::image_testing_decode_sync_enabled()) {
flags |= PaintFrameFlags::SyncDecodeImages;
}
if (renderer->GetBackendType() == layers::LayersBackend::LAYERS_WR) {

View File

@@ -19,7 +19,7 @@ Note that we set widget.windows.window_occlusion_tracking.enabled=false for this
crashtests leave windows open and occlud the crashtest window, which means the refresh driver doesn't
run, which means the requestAnimationFrame don't run. Bug 1864255 tracks fixing this.
Note that we image.decode-sync.enabled=false for this test because sync decoding triggers extra
Note that we image.teseting.decode-sync.enabled=false for this test because sync decoding triggers extra
invalidation which "fixes" this bug before it gets a chance to appear. Bug 1866411 tracks this.
-->

View File

@@ -31,4 +31,4 @@ load 1714584-1.html
load 1763006-1.html
load 1819957-1.html
load 1851726-1.html
pref(widget.windows.window_occlusion_tracking.enabled,false) pref(image.decode-sync.enabled,false) load 1862277-1.html
pref(widget.windows.window_occlusion_tracking.enabled,false) pref(image.testing.decode-sync.enabled,false) load 1862277-1.html

View File

@@ -7036,8 +7036,8 @@
value: false
mirror: always
# Decode all images synchronously
- name: image.decode-sync.enabled
# Decode all images synchronously, intended to be used for reftests.
- name: image.testing.decode-sync.enabled
type: bool
value: false
mirror: always

View File

@@ -43,7 +43,7 @@ user_pref("gfx.logging.level", 1);
user_pref("image.downscale-during-decode.enabled", false);
// We do the capturing the reftest results with sync decoding
// so we want to be consistent.
user_pref("image.decode-sync.enabled", true);
user_pref("image.testing.decode-sync.enabled", true);
// Disable interruptible reflow since (1) it's normally not going to
// happen, but (2) it might happen if we somehow end up with both
// pending user events and clock skew. So to avoid having to change