[cairo] Pixel RGB Values...

Vladimir Vukicevic vladimir at pobox.com
Wed Jul 22 17:08:51 PDT 2009


On 7/22/09 2:52 PM, Bill Spitzak wrote:
> Chris Wilson wrote:
>
>>>> In use, mapping a surface returns an image surface that you can use to
>>>> manipulate pixels directly, and unmapping ensures that the changes are
>>>> flushed to the backing surface. Internally this works just like
>>>> acquire_dest_image()/release_dest_image() but...
>
> How about "cairo_surface_acquire_image()" and
> "cairo_surface_release_image()" as names then?
>
>>> If you don't disable rendering to the surface, then I'm not sure I
>>> completely understand the semantics of your proposed map...
>
> I think it would be acceptable to say that results of drawing to the
> original surface during this time the image is acquired are undefined
> (they may be thrown away, they may appear and then be overwritten when
> the image is released, or they may be copied to the image).

I agree with either this, or just making all rendering be thrown away 
until the surface is unmapped.  The most common use cases will be things 
like blur, as Chris pointed out earlier.  For use cases where you do 
actually want to mix vector and raster rendering, there's a simple 
solution -- just create an image surface to begin with...

     - Vlad



More information about the cairo mailing list