[cairo-commit] src/cairo-win32-private.h

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Thu Apr 21 14:54:56 PDT 2011


 src/cairo-win32-private.h |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit bf75c9542d97533d419ba19c8e2b91e03b0370da
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Thu Apr 21 17:53:21 2011 -0400

    win32: Explain the purpose of the surface extents
    
    It wasn't immediately obvious to me what the purpose of having
    extents instead of just a size was.

diff --git a/src/cairo-win32-private.h b/src/cairo-win32-private.h
index efb0c1e..b60c101 100644
--- a/src/cairo-win32-private.h
+++ b/src/cairo-win32-private.h
@@ -72,6 +72,15 @@ typedef struct _cairo_win32_surface {
 
     cairo_surface_t *image;
 
+    /* We use the x and y parts of extents for situations where
+     * we're not supposed to draw to the entire surface.
+     * For example, during a paint event a program will get
+     * a DC that has been clipped to the dirty region.
+     * A cairo surface constructed for that DC will have extents
+     * that match bounds of the clipped region.
+     *
+     * jrmuizel: I'm not sure if storing these extents instead
+     * of just using the size is better... */
     cairo_rectangle_int_t extents;
 
     /* Initial clip bits


More information about the cairo-commit mailing list