Bug 1568136 - Call gfxUtils::RemoveShaderCacheFromDiskIfNecessary() in gfxPlatform::InitWebRenderConfig() r=nical a=RyanVM DEVEDITION_69_0b8_BUILD1 DEVEDITION_69_0b8_RELEASE FIREFOX_69_0b8_BUILD1 FIREFOX_69_0b8_RELEASE
authorsotaro <sotaro.ikeda.g@gmail.com>
Tue, 23 Jul 2019 12:22:41 +0000
changeset 544745 53bb71da50e59d953cdcd68a29c5afabd160abfc
parent 544744 1d05fe8447ed78f49ca0f31c7b322b1ebb11d45f
child 544746 0b680f90e44b5c9c1637f67bd0a9c9e98c48d24a
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical, RyanVM
bugs1568136
milestone69.0
Bug 1568136 - Call gfxUtils::RemoveShaderCacheFromDiskIfNecessary() in gfxPlatform::InitWebRenderConfig() r=nical a=RyanVM The RemoveShaderCacheFromDiskIfNecessary() needs to be called after WebRenderConfig initialization. Differential Revision: https://phabricator.services.mozilla.com/D38978
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -893,18 +893,16 @@ void gfxPlatform::Init() {
     if (NS_FAILED(rv)) {
       gfxVars::SetProfDirectory(nsString());
     } else {
       nsAutoString path;
       profDir->GetPath(path);
       gfxVars::SetProfDirectory(nsString(path));
     }
 
-    gfxUtils::RemoveShaderCacheFromDiskIfNecessary();
-
     nsAutoCString path;
     Preferences::GetCString("layers.windowrecording.path", path);
     gfxVars::SetLayersWindowRecordingPath(path);
   }
 
   // Drop a note in the crash report if we end up forcing an option that could
   // destabilize things.  New items should be appended at the end (of an
   // existing or in a new section), so that we don't have to know the version to
@@ -3083,16 +3081,19 @@ void gfxPlatform::InitWebRenderConfig() 
   }
   if (Preferences::GetBool("gfx.webrender.dcomp-win-triple-buffering.enabled",
                            false)) {
     if (gfxVars::UseWebRenderDCompWin()) {
       gfxVars::SetUseWebRenderDCompWinTripleBuffering(true);
     }
   }
 #endif
+  // The RemoveShaderCacheFromDiskIfNecessary() needs to be called after
+  // WebRenderConfig initialization.
+  gfxUtils::RemoveShaderCacheFromDiskIfNecessary();
 }
 
 void gfxPlatform::InitOMTPConfig() {
   ScopedGfxFeatureReporter reporter("OMTP");
 
   FeatureState& omtp = gfxConfig::GetFeature(Feature::OMTP);
   int32_t paintWorkerCount = PaintThread::CalculatePaintWorkerCount();