Bug 1289251 - Replace GetDefaultContentBackend in nShmImage to use gfxVar. r=dvander
MozReview-Commit-ID: LYsjgi5FchN
--- 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;