Bug 1289251 - Replace GetDefaultContentBackend in nShmImage to use gfxVar. r=dvander
☠☠ backed out by 84bab1407100 ☠ ☠
authorRyan Hunt <rhunt@mozilla.com>
Mon, 15 Aug 2016 17:44:33 -0700
changeset 338097 2467398cd9587802f15f46179bbd8c073b441f48
parent 338096 249ed3e46aa2ce9067659bff16d7b33be814120c
child 338098 c0285428a8a04dd0d8f7ad1ed46a2e04147dfbc6
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;