[cairo-commit] src/cairo-gl-glyphs.c src/cairo-gl-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Jul 28 08:55:11 PDT 2011


 src/cairo-gl-glyphs.c  |   10 ++++++++--
 src/cairo-gl-surface.c |   12 +++++++-----
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit aad2c3dd0f7a512e6d3db087bf94ab53e30e92ed
Author: Matt Peterson <revcompgeek at gmail.com>
Date:   Wed Jul 27 14:48:31 2011 -0600

    gl: Use cairo_rectangle_int_t

diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
index 81efbbb..ba09442 100644
--- a/src/cairo-gl-glyphs.c
+++ b/src/cairo-gl-glyphs.c
@@ -437,6 +437,11 @@ _cairo_gl_surface_show_glyphs_via_mask (cairo_gl_surface_t	*dst,
     return status;
 }
 
+
+cairo_private cairo_bool_t
+_cairo_gl_surface_get_extents (void		     *abstract_surface,
+			       cairo_rectangle_int_t *rectangle);
+
 cairo_int_status_t
 _cairo_gl_surface_show_glyphs (void			*abstract_dst,
 			       cairo_operator_t		 op,
@@ -449,6 +454,7 @@ _cairo_gl_surface_show_glyphs (void			*abstract_dst,
 {
     cairo_gl_surface_t *dst = abstract_dst;
     cairo_composite_rectangles_t extents;
+    cairo_rectangle_int_t unbounded;
     cairo_bool_t overlap, use_mask = FALSE;
     cairo_bool_t has_component_alpha;
     cairo_status_t status;
@@ -534,9 +540,9 @@ _cairo_gl_surface_show_glyphs (void			*abstract_dst,
     if (! _cairo_gl_surface_owns_font (dst, scaled_font))
 	return UNSUPPORTED ("do not control font");
 
+    _cairo_gl_surface_get_extents (dst, &unbounded);
     status = _cairo_composite_rectangles_init_for_glyphs (&extents,
-							  dst->width,
-							  dst->height,
+							  &unbounded,
 							  op, source,
 							  scaled_font,
 							  glyphs, num_glyphs,
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index 7d27ecd..fde9335 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
@@ -1581,7 +1581,7 @@ FAIL:
     return _cairo_span_renderer_create_in_error (status);
 }
 
-static cairo_bool_t
+cairo_private cairo_bool_t
 _cairo_gl_surface_get_extents (void		     *abstract_surface,
 			       cairo_rectangle_int_t *rectangle)
 {
@@ -1695,12 +1695,13 @@ _cairo_gl_surface_stroke (void			        *abstract_surface,
 {
     cairo_gl_surface_t *surface = abstract_surface;
     cairo_composite_rectangles_t extents;
+    cairo_rectangle_int_t unbounded;
     cairo_polygon_t polygon;
     cairo_status_t status;
 
+    _cairo_gl_surface_get_extents (surface, &unbounded);
     status = _cairo_composite_rectangles_init_for_stroke (&extents,
-							  surface->width,
-							  surface->height,
+							  &unbounded,
 							  op, source,
 							  path, style, ctm,
 							  clip);
@@ -1737,12 +1738,13 @@ _cairo_gl_surface_fill (void			*abstract_surface,
 {
     cairo_gl_surface_t *surface = abstract_surface;
     cairo_composite_rectangles_t extents;
+    cairo_rectangle_int_t unbounded;
     cairo_polygon_t polygon;
     cairo_status_t status;
 
+    _cairo_gl_surface_get_extents (surface, &unbounded);
     status = _cairo_composite_rectangles_init_for_fill (&extents,
-							surface->width,
-							surface->height,
+							&unbounded,
 							op, source, path,
 							clip);
     if (unlikely (status))


More information about the cairo-commit mailing list