Bug 1151713 - Initialize the layers prefs earlier. r=jrmuizel, a=ritu
authornsilva@mozilla.com
Thu, 16 Apr 2015 11:55:36 -0400
changeset 267584 0e89ce35d118ac19b8c25aed9f1d83b9349392d0
parent 267583 ddf891831a04af09b0da8fcdd2c3ded75cc8b7ea
child 267585 081397fd519a4bc7e1d7777b6f12637a47084b10
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, ritu
bugs1151713
milestone39.0
Bug 1151713 - Initialize the layers prefs earlier. r=jrmuizel, a=ritu
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -136,16 +136,18 @@ static bool gCMSInitialized = false;
 static eCMSMode gCMSMode = eCMSMode_Off;
 
 static void ShutdownCMS();
 
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/SourceSurfaceCairo.h"
 using namespace mozilla::gfx;
 
+void InitLayersAccelerationPrefs();
+
 /* Class to listen for pref changes so that chrome code can dynamically
    force sRGB as an output profile. See Bug #452125. */
 class SRGBOverrideObserver final : public nsIObserver,
                                    public nsSupportsWeakReference
 {
     ~SRGBOverrideObserver() {}
 public:
     NS_DECL_ISUPPORTS
@@ -492,16 +494,17 @@ gfxPlatform::Init()
 #else
     #error "No gfxPlatform implementation available"
 #endif
 
 #ifdef MOZ_GL_DEBUG
     mozilla::gl::GLContext::StaticInit();
 #endif
 
+    InitLayersAccelerationPrefs();
     InitLayersIPC();
 
     nsresult rv;
 
 #if defined(XP_MACOSX) || defined(XP_WIN) || defined(ANDROID) // temporary, until this is implemented on others
     rv = gfxPlatformFontList::Init();
     if (NS_FAILED(rv)) {
         NS_RUNTIMEABORT("Could not initialize gfxPlatformFontList");