From 3b2115fe469162b2f8bd9a54a0abaa9f8bf40c8b Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 12 Mar 2010 11:12:00 +0100 Subject: [PATCH] Bug 549056: We always do double pass drawing when we're not a Win32 surface. r=jmathies,jrmuizel --- gfx/thebes/src/gfxWindowsNativeDrawing.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gfx/thebes/src/gfxWindowsNativeDrawing.cpp b/gfx/thebes/src/gfxWindowsNativeDrawing.cpp index fe87d4ffa185..815a4a5823db 100644 --- a/gfx/thebes/src/gfxWindowsNativeDrawing.cpp +++ b/gfx/thebes/src/gfxWindowsNativeDrawing.cpp @@ -212,13 +212,14 @@ gfxWindowsNativeDrawing::BeginNativeDrawing() PRBool gfxWindowsNativeDrawing::IsDoublePass() { - // this is the same test we use in BeginNativeDrawing. nsRefPtr surf = mContext->CurrentSurface(&mDeviceOffset.x, &mDeviceOffset.y); if (!surf || surf->CairoStatus()) return false; - if ((surf->GetType() == gfxASurface::SurfaceTypeWin32 || - surf->GetType() == gfxASurface::SurfaceTypeWin32Printing) && - (surf->GetContentType() != gfxASurface::CONTENT_COLOR || + if (surf->GetType() != gfxASurface::SurfaceTypeWin32 || + surf->GetType() != gfxASurface::SurfaceTypeWin32Printing) { + return PR_TRUE; + } + if ((surf->GetContentType() != gfxASurface::CONTENT_COLOR || (surf->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA && !(mNativeDrawFlags & CAN_DRAW_TO_COLOR_ALPHA)))) return PR_TRUE;