Bug 711063 - Part 4: Adjust gfxUtils to be compatible with Azure wrapper. r=jrmuizel

This commit is contained in:
Bas Schouten 2012-01-05 08:17:51 +01:00
Родитель f517d38aa8
Коммит dc184831d8
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -297,11 +297,11 @@ struct NS_STACK_CLASS AutoCairoPixmanBugWorkaround
AutoCairoPixmanBugWorkaround(gfxContext* aContext,
const gfxMatrix& aDeviceSpaceToImageSpace,
const gfxRect& aFill,
const gfxASurface::gfxSurfaceType& aSurfaceType)
const gfxASurface* aSurface)
: mContext(aContext), mSucceeded(true), mPushedGroup(false)
{
// Quartz's limits for matrix are much larger than pixman
if (aSurfaceType == gfxASurface::SurfaceTypeQuartz)
if (!aSurface || aSurface->GetType() == gfxASurface::SurfaceTypeQuartz)
return;
if (!IsSafeImageTransformComponent(aDeviceSpaceToImageSpace.xx) ||
@ -381,12 +381,11 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext,
bool doTile = !aImageRect.Contains(aSourceRect);
nsRefPtr<gfxASurface> currentTarget = aContext->CurrentSurface();
gfxASurface::gfxSurfaceType surfaceType = currentTarget->GetType();
gfxMatrix deviceSpaceToImageSpace =
DeviceToImageTransform(aContext, aUserSpaceToImageSpace);
AutoCairoPixmanBugWorkaround workaround(aContext, deviceSpaceToImageSpace,
aFill, surfaceType);
aFill, currentTarget);
if (!workaround.Succeeded())
return;