Bug 756606. Don't try to fast path D2D A8 surfaces in GetSourceSurfaceForSurface. r=Bas
authorNicholas Cameron <ncameron@mozilla.com>
Mon, 29 Jul 2013 10:12:37 +1200
changeset 140282 51d91b3220d99b704456954eb79fbe31cbbbfcdf
parent 140281 2d7d821c792dc4f3e1bd40a0809af934c59e19a1
child 140283 bdc535ec42067d3c723821a9bf0ce94c34c887ca
push id25023
push useremorley@mozilla.com
push dateMon, 29 Jul 2013 14:13:44 +0000
treeherdermozilla-central@8c89fe2a5c92 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs756606
milestone25.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 756606. Don't try to fast path D2D A8 surfaces in GetSourceSurfaceForSurface. r=Bas
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -629,17 +629,18 @@ gfxPlatform::GetSourceSurfaceForSurface(
     format = FORMAT_B8G8R8X8;
   } else {
     format = FORMAT_B8G8R8A8;
   }
 
   RefPtr<SourceSurface> srcBuffer;
 
 #ifdef XP_WIN
-  if (aSurface->GetType() == gfxASurface::SurfaceTypeD2D) {
+  if (aSurface->GetType() == gfxASurface::SurfaceTypeD2D &&
+      format != FORMAT_A8) {
     NativeSurface surf;
     surf.mFormat = format;
     surf.mType = NATIVE_SURFACE_D3D10_TEXTURE;
     surf.mSurface = static_cast<gfxD2DSurface*>(aSurface)->GetTexture();
     mozilla::gfx::DrawTarget *dt = static_cast<mozilla::gfx::DrawTarget*>(aSurface->GetData(&kDrawTarget));
     if (dt) {
       dt->Flush();
     }