Bug 1066668: Do not attempt to interop with D2D 1.1 inside D2D 1.0. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Sun, 14 Sep 2014 23:51:34 +0200
changeset 205257 2fb6f57ceb95ce4f95205e24ded19fdb6c66561e
parent 205256 e0424b8a4538b9cd68ab7524acbe5074c5d26ffe
child 205258 d72eb77228faf488dba41a67859b3f25de967b54
push id49118
push userbschouten@mozilla.com
push dateSun, 14 Sep 2014 21:53:14 +0000
treeherdermozilla-inbound@8e28464849fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1066668
milestone35.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 1066668: Do not attempt to interop with D2D 1.1 inside D2D 1.0. r=jrmuizel
gfx/2d/DrawTargetD2D.cpp
--- a/gfx/2d/DrawTargetD2D.cpp
+++ b/gfx/2d/DrawTargetD2D.cpp
@@ -328,23 +328,18 @@ DrawTargetD2D::GetBitmapForSurface(Sourc
 }
 
 #ifdef USE_D2D1_1
 TemporaryRef<ID2D1Image>
 DrawTargetD2D::GetImageForSurface(SourceSurface *aSurface)
 {
   RefPtr<ID2D1Image> image;
 
-  if (aSurface->GetType() == SurfaceType::D2D1_1_IMAGE) {
-    image = static_cast<SourceSurfaceD2D1*>(aSurface)->GetImage();
-    static_cast<SourceSurfaceD2D1*>(aSurface)->EnsureIndependent();
-  } else {
-    Rect r(Point(), Size(aSurface->GetSize()));
-    image = GetBitmapForSurface(aSurface, r);
-  }
+  Rect r(Point(), Size(aSurface->GetSize()));
+  image = GetBitmapForSurface(aSurface, r);
 
   return image;
 }
 #endif
 
 void
 DrawTargetD2D::DrawSurface(SourceSurface *aSurface,
                            const Rect &aDest,