Bug 1289251 - Replace GetDefaultContentBackend in nShmImage to use gfxVar. r=dvander
authorRyan Hunt <rhunt@mozilla.com>
Mon, 15 Aug 2016 17:44:33 -0700
changeset 312590 66d2073839bb53dce468a44f267bdae5ebfb2cf9
parent 312589 90644e264b8351f8c280284ae838bfacef90f69b
child 312591 be4e5ce4a8a4edd40c76b1df76cc8fce765e9655
push id30647
push userphilringnalda@gmail.com
push dateSun, 04 Sep 2016 04:50:54 +0000
treeherdermozilla-central@d61bbdd0b155 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1289251
milestone51.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 1289251 - Replace GetDefaultContentBackend in nShmImage to use gfxVar. r=dvander MozReview-Commit-ID: LYsjgi5FchN
widget/nsShmImage.cpp
--- a/widget/nsShmImage.cpp
+++ b/widget/nsShmImage.cpp
@@ -3,16 +3,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsShmImage.h"
 
 #ifdef MOZ_HAVE_SHMIMAGE
 #include "mozilla/X11Util.h"
+#include "mozilla/gfx/gfxVars.h"
 #include "mozilla/ipc/SharedMemory.h"
 #include "gfxPlatform.h"
 #include "nsPrintfCString.h"
 #include "nsTArray.h"
 
 #include <errno.h>
 #include <string.h>
 #include <sys/ipc.h>
@@ -145,17 +146,17 @@ nsShmImage::CreateImage(const IntSize& a
   MOZ_ASSERT(mConnection && mVisual);
 
   if (!InitExtension()) {
     return false;
   }
 
   mSize = aSize;
 
-  BackendType backend = gfxPlatform::GetPlatform()->GetDefaultContentBackend();
+  BackendType backend = gfxVars::ContentBackend();
 
   mFormat = SurfaceFormat::UNKNOWN;
   switch (mDepth) {
   case 32:
     if (mVisual->red_mask == 0xff0000 &&
         mVisual->green_mask == 0xff00 &&
         mVisual->blue_mask == 0xff) {
       mFormat = SurfaceFormat::B8G8R8A8;