From 6b3ab9ec43e84f1bf560ee5c0046863310bf501e Mon Sep 17 00:00:00 2001 From: Anthony Jones Date: Tue, 24 Jul 2012 22:18:38 +1200 Subject: [PATCH] Bug 764125; pretty sure this inverted logic will break something on windows; r=Bas --- gfx/thebes/gfxPlatform.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 65e9347f76c..9fb6be8ddbf 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -532,11 +532,8 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa if (!srcBuffer) { nsRefPtr imgSurface = aSurface->GetAsImageSurface(); - bool isWin32ImageSurf = false; - - if (imgSurface && aSurface->GetType() != gfxASurface::SurfaceTypeWin32) { - isWin32ImageSurf = true; - } + bool isWin32ImageSurf = imgSurface && + aSurface->GetType() == gfxASurface::SurfaceTypeWin32; if (!imgSurface) { imgSurface = new gfxImageSurface(aSurface->GetSize(), OptimalFormatForContent(aSurface->GetContentType())); @@ -572,8 +569,8 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa if (!srcBuffer) { // We need to check if our gfxASurface will keep the underlying data - // alive! This is true if gfxASurface actually -is- an ImageSurface or - // if it is a gfxWindowsSurface which supportes GetAsImageSurface. + // alive. This is true if gfxASurface actually -is- an ImageSurface or + // if it is a gfxWindowsSurface which supports GetAsImageSurface. if (imgSurface != aSurface && !isWin32ImageSurf) { // This shouldn't happen for now, it can be easily supported by making // a copy. For now let's just abort.