Bug 1118328 - Part 2 - Followup: Workaround a bug in GCC 4.4. r=bustage on a CLOSED TREE
authorBas Schouten <bschouten@mozilla.com>
Thu, 08 Jan 2015 03:34:07 +0100
changeset 222590 28bbffbcd08e6c15b6d8880d73adeba5dc31b1b6
parent 222589 8fa274cce61603fd43290624d639c8cae9e80b8b
child 222591 00996e98fa624e9dc642f95d695814e9be1b6dbd
push id28068
push usercbook@mozilla.com
push dateThu, 08 Jan 2015 13:16:34 +0000
treeherdermozilla-central@2880e05d5e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1118328
milestone37.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 1118328 - Part 2 - Followup: Workaround a bug in GCC 4.4. r=bustage on a CLOSED TREE
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -1177,17 +1177,21 @@ gfxPlatform::CreateOffscreenContentDrawT
   return CreateDrawTargetForBackend(mContentBackend, aSize, aFormat);
 }
 
 TemporaryRef<DrawTarget>
 gfxPlatform::CreateDrawTargetForData(unsigned char* aData, const IntSize& aSize, int32_t aStride, SurfaceFormat aFormat)
 {
   NS_ASSERTION(mContentBackend != BackendType::NONE, "No backend.");
 
-  BackendType backendType = Factory::DoesBackendSupportDataDrawtarget(mContentBackend) ? mContentBackend : BackendType::CAIRO;
+  BackendType backendType = mContentBackend;
+  
+  if (!Factory::DoesBackendSupportDataDrawtarget(mContentBackend)) {
+    backendType = BackendType::CAIRO;
+  }
 
   RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(backendType,
                                                            aData, aSize,
                                                            aStride, aFormat);
 
   return dt.forget();
 }