Bug 922807. Always draw images with OVER. r=roc

There's no reason I can see to draw them with SOURCE. SOURCE is slower with the
Azure wrapper (see FillAzure()). It is also slow with cairo when we have a
clip.

--HG--
extra : rebase_source : 5c92c09a20699213ef90fad35ae8309f5ca88979
This commit is contained in:
Jeff Muizelaar 2013-10-01 21:22:44 -04:00
parent f12f00556d
commit 42c0a6280a

View File

@ -190,6 +190,7 @@ IsSafeImageTransformComponent(gfxFloat aValue)
return aValue >= -32768 && aValue <= 32767;
}
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
/**
* This returns the fastest operator to use for solid surfaces which have no
* alpha channel or their alpha channel is uniformly opaque.
@ -211,7 +212,6 @@ OptimalFillOperator()
#endif
}
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
// EXTEND_PAD won't help us here; we have to create a temporary surface to hold
// the subimage of pixels we're allowed to sample.
static already_AddRefed<gfxDrawable>
@ -482,15 +482,7 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext,
}
#endif
gfxContext::GraphicsOperator op = aContext->CurrentOperator();
if ((op == gfxContext::OPERATOR_OVER || workaround.PushedGroup()) &&
aFormat == gfxImageFormatRGB24) {
aContext->SetOperator(OptimalFillOperator());
}
drawable->Draw(aContext, aFill, doTile, aFilter, userSpaceToImageSpace);
aContext->SetOperator(op);
}
/* static */ int