[cairo] patch: quartz - fallback when source/mask has CAIRO_EXTEND_PAD and they are surface type

Andrea Canciani ranma42 at gmail.com
Tue Jul 24 10:23:12 PDT 2012


On Tue, Jul 24, 2012 at 4:20 PM, Henry (Yu) Song - SISA
<hsong at sisa.samsung.com> wrote:
> Hi, Andrea
>
> How about the other patch that fixes crashes for all record test cases?

I pushed it with a slightly different commit message:

commit 44a07a66135c4f534c909bd84f24cf7c0275a914
Author: Henry (Yu) Song - SISA <hsong at sisa.samsung.com>
Date:   Mon Jul 23 16:28:28 2012 +0000

    quartz: Never acquire recording surfaces

    We need to replay if the source/mask surface is a recording surface
    otherwise, a crash happens if it is unbounded.

    Fixes crashes in recordxx-xxx tests

I also pushed the one for transforming clip paths and another patch to
respect the scaling when replaying recording surfaces in quartz.

Andrea

>
> Thanks
>
> Henry
> ________________________________________
> From: Andrea Canciani [ranma42 at gmail.com]
> Sent: Tuesday, July 24, 2012 2:39 AM
> To: Henry (Yu) Song - SISA
> Cc: cairo at cairographics.org
> Subject: Re: [cairo] patch: quartz - fallback when source/mask has CAIRO_EXTEND_PAD and they are surface type
>
> Thanks for your patches!
> I tested and pushed them (with minor whitespace and commit message changes).
>
> On Mon, Jul 23, 2012 at 9:35 PM, Henry (Yu) Song - SISA
> <hsong at sisa.samsung.com> wrote:
>> commit 20d3005bc98d0f75606c67175ec73a9ce3827e31
>> Author: Henry Song <henry.song at samsung.com>
>> Date:   Mon Jul 23 12:33:45 2012 -0700
>>
>>     quartz:  quartz does not handle CAIRO_EXTEND_PAD, let's fallback
>
> I had posted a patch to do the same, but the Mozilla guys did not want
> the fallback to happen.
>
>>
>> diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
>> index 28bdae6..471c95d 100644
>> --- a/src/cairo-quartz-surface.c
>> +++ b/src/cairo-quartz-surface.c
>> @@ -1139,6 +1139,15 @@ _cairo_quartz_setup_state (cairo_quartz_drawing_state_t *state,
>>      state->cgDrawContext = NULL;
>>      state->cgMaskContext = NULL;
>>
>> +    /* FIXME: ideally, we should use CIImage's CIAffineClamp for
>> +       CAIRO_EXTEND_PAD
>> +     */
>
> A related issue happens for repeated images, which are interpolated in
> the inside but not across the image edges.
> Maybe both can be fixed using CIImage... but is it possible to use it
> without using Objective-C?
> Another thing I wanted to look into was modifying the dataprovider to
> handle repeat/pad.
>
>> +    if ((composite->source_pattern.base.type == CAIRO_PATTERN_TYPE_SURFACE &&
>> +        composite->source_pattern.base.extend == CAIRO_EXTEND_PAD) ||
>> +       (composite->mask_pattern.base.type == CAIRO_PATTERN_TYPE_SURFACE &&
>> +        composite->mask_pattern.base.extend == CAIRO_EXTEND_PAD))
>> +       return CAIRO_INT_STATUS_UNSUPPORTED;
>> +
>>      status = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
>>      if (unlikely (status))
>>         return status;
>> --
>> cairo mailing list
>> cairo at cairographics.org
>> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list