Bug 1289251 - Replace GetDefaultContentBackend in nShmImage to use gfxVar. r=dvander draft
authorRyan Hunt <rhunt@mozilla.com>
Mon, 15 Aug 2016 17:44:33 -0700
changeset 409439 1525cae07bf32cc4e95c9b56d801f8450440053d
parent 409041 d5f20820c80514476f596090292a5d77c4b41e3b
child 409440 a763801b00355ac8ea5451af744bb81a0b4dc2da
push id28469
push userbmo:ryanhunt@outlook.com
push dateFri, 02 Sep 2016 20:44:32 +0000
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;