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 235614 28bbffbcd08e6c15b6d8880d73adeba5dc31b1b6
parent 235613 8fa274cce61603fd43290624d639c8cae9e80b8b
child 235615 00996e98fa624e9dc642f95d695814e9be1b6dbd
push id366
push usercmanchester@mozilla.com
push dateThu, 08 Jan 2015 16:40:24 +0000
reviewersbustage
bugs1118328
milestone37.0a1
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();
 }