Backout 467595d39929 (bug 1118328) for build bustage on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Wed, 07 Jan 2015 16:53:13 -0800
changeset 248397 92190a900cb0b1a5407f347cdd17a5d6b5d5b0d8
parent 248396 9e0680f301a418b77cc56220a72ef48ae2a18329
child 248398 b30f55f7f94cf1c3f1be50e90d90c9fa79c2145c
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1118328
milestone37.0a1
backs out467595d3992901497c87fa93b465b9079b22bc5b
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
Backout 467595d39929 (bug 1118328) for build bustage on a CLOSED TREE
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -1177,22 +1177,26 @@ 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;
-
-  RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(backendType,
+  RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(mContentBackend,
                                                            aData, aSize,
                                                            aStride, aFormat);
-
+  if (!dt) {
+    // Factory::CreateDrawTargetForData does not support mContentBackend; retry
+    // with BackendType::CAIRO:
+    dt = Factory::CreateDrawTargetForData(BackendType::CAIRO,
+                                          aData, aSize,
+                                          aStride, aFormat);
+  }
   return dt.forget();
 }
 
 /* static */ BackendType
 gfxPlatform::BackendTypeForName(const nsCString& aName)
 {
   if (aName.EqualsLiteral("cairo"))
     return BackendType::CAIRO;