[cairo] is self-copy supposed to work?

Matt Woodrow matt.woodrow at gmail.com
Mon May 3 19:08:27 PDT 2010


Having self copy work correctly (and preferably without needing a 
temporary surface in the simple cases) is going
to be important for implementing scrolling in Rob's Layers work for Firefox.

Because of this I've started trying to modify pixman to handle this 
correctly.

Mozilla bug with my work so far is at: 
https://bugzilla.mozilla.org/show_bug.cgi?id=563488

The basic idea is to add a new flags parameter to pixman_fast_path_t 
that defines how well the function supports
self-copying (if at all). do_composite now calculates the type of 
self-copy and factors these flags into it's search
for an appropriate fast path.

Currently I've updated general_composite_rect function and 
sse2_composite_over_8888_8888 to handle self-copies,
and we can add more as required.

Does anyone have any thoughts or suggestions on this?

Thanks

Matt Woodrow

On 1/05/10 12:30 AM, Benjamin Otte wrote:
> On Fri, 2010-04-30 at 12:28 +0100, Chris Wilson wrote:
>    
>> Currently self-copy behaviour is underspecified. I think the consensus is
>> that self-modification is undesired...
>>
>>      
> Last I brought this up the consensus was a lot stronger than just
> "undesired".
> I'd vote to make it an explicit error on the gstate if you set a
> source/mask that was identical to the target.
> If you document that clearly for set_source() and mask() and enable
> using push_group() as a workaround, the problem would almost be solved.
>
> I also suppose that a lot of people would expect self-copies to do
> special magic (like XCopyArea), and I think trying to provide that is
> both a lot of work and often impossible anyway.
>
> Benjamin
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
>    


More information about the cairo mailing list