[cairo] API Shakeup: cairo_<device>_surface_mark_dirty
cworth at redhat.com
Mon Aug 1 10:44:36 PDT 2005
On Fri, 29 Jul 2005 19:34:15 -0400, Owen Taylor wrote:
> Here's an initial implementation of the
> cairo_surface_mark_dirty() and cairo_surface_flush(). The only use
> made of these functions currently is that cairo_surface_flush() for the
> win32 backend restores the clip for the surface's DC to its original
> - I made the functions virtual functions that does nothing if nothing
> is needed. I don't see the point in duplicating it out.
That seems right to me. The fewer device-specific calls the better to
a large extent. Particularly where no device-specific data types are
> - I have separate cairo_surface_mark_dirty() and
> cairo_surface_mark_rectangle_dirty() functions since I think not
> knowing the bounds of the dirty region will be common. Internally
> I use negative width/height to flag this case, but I thought that
> was ugly to expose in the public API.
Thanks for not exposing a "magic" meaning for negative numbers here. I
like the separate function for marking the entire surface dirty. The
only change I would recommend is to give the two functions a common
This should also fit in well with the "optional arguments" section of
the bindings recommendations.
> - I did not make finishing drawing to a cairo_t automatically flush
> the surface.
> - I did make cairo_surface_finish() automatically flush, since it
> seems always desirable.
Those arguments seem reasonable to me.
If you agree with me on the name change, then feel free to commit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050801/c0417518/attachment.pgp
More information about the cairo