Bug 1538710 - Remove disable-shrink pref r=bholley
☠☠ backed out by 28a607fe5e9b ☠ ☠
authorDoug Thayer <dothayer@mozilla.com>
Mon, 08 Apr 2019 15:25:47 +0000
changeset 468365 9a80bc4d626a74d84ae9b4163021d1dcbc585a24
parent 468364 f5f916011032472ba3e09b4880c856fad00da189
child 468366 048424eb3075256daa7ee76cd536d24d75505cee
push id35835
push useraciure@mozilla.com
push dateMon, 08 Apr 2019 19:00:29 +0000
treeherdermozilla-central@40456af7da1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1538710
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1538710 - Remove disable-shrink pref r=bholley Differential Revision: https://phabricator.services.mozilla.com/D25134
gfx/thebes/gfxPlatform.cpp
gfx/wr/webrender/src/texture_cache.rs
gfx/wr/webrender_api/src/api.rs
modules/libpref/init/all.js
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -563,18 +563,16 @@ static void WebRenderDebugPrefChangeCall
                       wr::DebugFlags_NEW_SCENE_INDICATOR)
   GFX_WEBRENDER_DEBUG(".show-overdraw", wr::DebugFlags_SHOW_OVERDRAW)
   GFX_WEBRENDER_DEBUG(".gpu-cache", wr::DebugFlags_GPU_CACHE_DBG)
   GFX_WEBRENDER_DEBUG(".slow-frame-indicator",
                       wr::DebugFlags_SLOW_FRAME_INDICATOR)
   GFX_WEBRENDER_DEBUG(".texture-cache.clear-evicted",
                       wr::DebugFlags_TEXTURE_CACHE_DBG_CLEAR_EVICTED)
   GFX_WEBRENDER_DEBUG(".picture-caching", wr::DebugFlags_PICTURE_CACHING_DBG)
-  GFX_WEBRENDER_DEBUG(".texture-cache.disable-shrink",
-                      wr::DebugFlags_TEXTURE_CACHE_DBG_DISABLE_SHRINK)
   GFX_WEBRENDER_DEBUG(".primitives", wr::DebugFlags_PRIMITIVE_DBG)
   // Bit 18 is for the zoom display, which requires the mouse position and thus
   // currently only works in wrench.
   GFX_WEBRENDER_DEBUG(".small-screen", wr::DebugFlags_SMALL_SCREEN)
 #undef GFX_WEBRENDER_DEBUG
 
   gfx::gfxVars::SetWebRenderDebugFlags(flags.bits);
 }
--- a/gfx/wr/webrender/src/texture_cache.rs
+++ b/gfx/wr/webrender/src/texture_cache.rs
@@ -606,23 +606,16 @@ impl TextureCache {
     }
 
     pub fn set_debug_flags(&mut self, flags: DebugFlags) {
         self.debug_flags = flags;
     }
 
     /// Clear all entries of the specified kind.
     fn clear_kind(&mut self, kind: EntryKind) {
-        // This pref just helps us avoid crashes when we begin using multiple documents.
-        // What we need to do for clear to work correctly with multiple documents is
-        // to ensure that we generate frames for all documents whenever we do this.
-        if self.debug_flags.contains(DebugFlags::TEXTURE_CACHE_DBG_DISABLE_SHRINK) {
-            return;
-        }
-
         let mut per_doc_data = mem::replace(&mut self.per_doc_data, FastHashMap::default());
         for (&_, doc_data) in per_doc_data.iter_mut() {
             let entry_handles = mem::replace(
                 doc_data.handles.select(kind),
                 Vec::new(),
             );
 
             for handle in entry_handles {
@@ -645,19 +638,16 @@ impl TextureCache {
         if let Some(ref mut picture_texture) = self.picture_texture {
             if let Some(texture_id) = picture_texture.reset(PICTURE_TEXTURE_ADD_SLICES) {
                 self.pending_updates.push_realloc(texture_id, picture_texture.to_info());
             }
         }
     }
 
     fn clear_shared(&mut self) {
-        if self.debug_flags.contains(DebugFlags::TEXTURE_CACHE_DBG_DISABLE_SHRINK) {
-            return;
-        }
         self.unset_doc_data();
         self.clear_kind(EntryKind::Shared);
         self.shared_textures.clear(&mut self.pending_updates);
         self.set_doc_data();
     }
 
     /// Clear all entries in the texture cache. This is a fairly drastic
     /// step that should only be called very rarely.
--- a/gfx/wr/webrender_api/src/api.rs
+++ b/gfx/wr/webrender_api/src/api.rs
@@ -1046,25 +1046,24 @@ bitflags! {
         /// Show an overlay displaying overdraw amount.
         const SHOW_OVERDRAW         = 1 << 11;
         /// Display the contents of GPU cache.
         const GPU_CACHE_DBG         = 1 << 12;
         const SLOW_FRAME_INDICATOR  = 1 << 13;
         const TEXTURE_CACHE_DBG_CLEAR_EVICTED = 1 << 14;
         /// Show picture caching debug overlay
         const PICTURE_CACHING_DBG   = 1 << 15;
-        const TEXTURE_CACHE_DBG_DISABLE_SHRINK = 1 << 16;
         /// Highlight all primitives with colors based on kind.
-        const PRIMITIVE_DBG = 1 << 17;
+        const PRIMITIVE_DBG = 1 << 16;
         /// Draw a zoom widget showing part of the framebuffer zoomed in.
-        const ZOOM_DBG = 1 << 18;
+        const ZOOM_DBG = 1 << 17;
         /// Scale the debug renderer down for a smaller screen. This will disrupt
         /// any mapping between debug display items and page content, so shouldn't
         /// be used with overlays like the picture caching or primitive display.
-        const SMALL_SCREEN = 1 << 19;
+        const SMALL_SCREEN = 1 << 18;
     }
 }
 
 pub struct RenderApi {
     api_sender: MsgSender<ApiMsg>,
     payload_sender: PayloadSender,
     namespace_id: IdNamespace,
     next_id: Cell<ResourceId>,
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -942,17 +942,16 @@ pref("gfx.compositor.glcontext.opaque", 
 pref("gfx.webrender.highlight-painted-layers", false);
 pref("gfx.webrender.blob-images", true);
 pref("gfx.webrender.blob.invalidation", true);
 pref("gfx.webrender.blob.paint-flashing", false);
 
 // WebRender debugging utilities.
 pref("gfx.webrender.debug.texture-cache", false);
 pref("gfx.webrender.debug.texture-cache.clear-evicted", true);
-pref("gfx.webrender.debug.texture-cache.disable-shrink", false);
 pref("gfx.webrender.debug.render-targets", false);
 pref("gfx.webrender.debug.gpu-cache", false);
 pref("gfx.webrender.debug.alpha-primitives", false);
 pref("gfx.webrender.debug.profiler", false);
 pref("gfx.webrender.debug.gpu-time-queries", false);
 pref("gfx.webrender.debug.gpu-sample-queries", false);
 pref("gfx.webrender.debug.disable-batching", false);
 pref("gfx.webrender.debug.epochs", false);