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 338339 66d2073839bb53dce468a44f267bdae5ebfb2cf9
parent 338338 90644e264b8351f8c280284ae838bfacef90f69b
child 338340 be4e5ce4a8a4edd40c76b1df76cc8fce765e9655
push id10033
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:50:26 +0000
treeherdermozilla-aurora@5dddbefdf759 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1289251
milestone51.0a1
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;