[quartz] Cleanup fallback source

Remove the transformation code as it's useless and confusing.
The clipbox was transformed in a wrong way if the CTM
was not the base one, otherwise the transformation did nothing.
As long as _cairo_quartz_setup_fallback_source is only called
with the base CTM, no transformation needs to be performed on the
clipbox.
Patch by Robert O'Callahan, see Mozilla bug #507939.
This commit is contained in:
Robert O'Callahan 2009-11-09 18:58:59 +01:00 committed by Andrea Canciani
parent 248090e52b
commit 7d8788b4ba

View file

@ -1148,7 +1148,6 @@ _cairo_quartz_setup_fallback_source (cairo_quartz_surface_t *surface,
const cairo_pattern_t *source)
{
CGRect clipBox = CGContextGetClipBoundingBox (surface->cgContext);
CGAffineTransform ctm;
double x0, y0, w, h;
cairo_surface_t *fallback;
@ -1160,14 +1159,6 @@ _cairo_quartz_setup_fallback_source (cairo_quartz_surface_t *surface,
clipBox.size.height == 0.0f)
return DO_NOTHING;
// the clipBox is in userspace, so:
ctm = CGContextGetCTM (surface->cgContext);
ctm = CGAffineTransformInvert (ctm);
clipBox = CGRectApplyAffineTransform (clipBox, ctm);
// get the Y flip right -- the CTM will always have a Y flip in place
clipBox.origin.y = surface->extents.height - (clipBox.origin.y + clipBox.size.height);
x0 = floor(clipBox.origin.x);
y0 = floor(clipBox.origin.y);
w = ceil(clipBox.origin.x + clipBox.size.width) - x0;