mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 00:38:06 +02:00
[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:
parent
248090e52b
commit
7d8788b4ba
1 changed files with 0 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue