[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo-commit
Subject:    [cairo-commit] src/cairo-win32-private.h
From:       jrmuizel () kemper ! freedesktop ! org (Jeff Muizelaar)
Date:       2011-04-21 21:54:56
Message-ID: 20110421215456.20AFAD8002 () kemper ! freedesktop ! org
[Download RAW message or body]

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

New commits:
commit bf75c9542d97533d419ba19c8e2b91e03b0370da
Author: Jeff Muizelaar <jmuizelaar@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
_______________________________________________
cairo-commit mailing list
cairo-commit@lists.cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic