[cairo-commit] 5 commits - src/cairo-cogl-surface.c src/cairo-error-private.h src/cairo-fixed-private.h src/cairo-fixed-type-private.h src/cairo-image-surface.c src/cairo-surface.c

Bryce Harrington bryce at kemper.freedesktop.org
Wed Feb 26 19:00:42 PST 2014


 src/cairo-cogl-surface.c       |    6 +++---
 src/cairo-error-private.h      |    7 +++++--
 src/cairo-fixed-private.h      |    5 +++--
 src/cairo-fixed-type-private.h |    2 +-
 src/cairo-image-surface.c      |    2 +-
 src/cairo-surface.c            |   10 ++++++++++
 6 files changed, 23 insertions(+), 9 deletions(-)

New commits:
commit f1709c298c355499a18796f389fa0fd9bc52b8c3
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Feb 26 18:55:25 2014 -0800

    Correct spelling of "tessellator" throughout code
    
    Based on patch suggested by Homer Hsing
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50411

diff --git a/src/cairo-cogl-surface.c b/src/cairo-cogl-surface.c
index 27c3676..7389c3e 100644
--- a/src/cairo-cogl-surface.c
+++ b/src/cairo-cogl-surface.c
@@ -143,7 +143,7 @@ typedef struct _cairo_cogl_path_fill_meta {
      * and translations but not for different scales.
      *
      * one idea is to track the diagonal lenghts of a unit rectangle
-     * transformed through the original ctm use to tesselate the geometry
+     * transformed through the original ctm use to tessellate the geometry
      * so we can check what the lengths are for any new ctm to know if
      * this geometry is compatible.
      */
@@ -167,7 +167,7 @@ typedef struct _cairo_cogl_path_stroke_meta {
      * and translations but not for different scales.
      *
      * one idea is to track the diagonal lenghts of a unit rectangle
-     * transformed through the original ctm use to tesselate the geometry
+     * transformed through the original ctm use to tessellate the geometry
      * so we can check what the lengths are for any new ctm to know if
      * this geometry is compatible.
      */
@@ -805,7 +805,7 @@ _cairo_cogl_journal_flush (cairo_cogl_surface_t *surface)
 		_cairo_path_fixed_approximate_clip_extents (&path->path, &extents);
 
 		/* TODO - maintain a fifo of the last 10 used clips with cached
-		 * primitives to see if we can avoid tesselating the path and
+		 * primitives to see if we can avoid tessellating the path and
 		 * uploading the vertices...
 		 */
 #if 0
diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h
index 62dc61a..9ff8f75 100644
--- a/src/cairo-fixed-private.h
+++ b/src/cairo-fixed-private.h
@@ -46,7 +46,7 @@
 
 #if (CAIRO_FIXED_BITS != 32)
 # error CAIRO_FIXED_BITS must be 32, and the type must be a 32-bit type.
-# error To remove this limitation, you will have to fix the tesselator.
+# error To remove this limitation, you will have to fix the tessellator.
 #endif
 
 #define CAIRO_FIXED_ONE        ((cairo_fixed_t)(1 << CAIRO_FIXED_FRAC_BITS))
diff --git a/src/cairo-fixed-type-private.h b/src/cairo-fixed-type-private.h
index 2bbd5f7..e9f26f6 100644
--- a/src/cairo-fixed-type-private.h
+++ b/src/cairo-fixed-type-private.h
@@ -50,7 +50,7 @@ typedef cairo_int128_t	cairo_fixed_64_64_t;
 typedef cairo_int128_t	cairo_fixed_96_32_t;
 
 /* Eventually, we should allow changing this, but I think
- * there are some assumptions in the tesselator about the
+ * there are some assumptions in the tessellator about the
  * size of a fixed type.  For now, it must be 32.
  */
 #define CAIRO_FIXED_BITS	32
commit 273210683f182d72789f88df80fec8c4d08bb30f
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Feb 26 18:44:46 2014 -0800

    Add comment to explain _cairo_edge_compute_intersection_*
    
    Patch by Homer Hsing
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50412

diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h
index e970c0f..62dc61a 100644
--- a/src/cairo-fixed-private.h
+++ b/src/cairo-fixed-private.h
@@ -312,7 +312,7 @@ _cairo_fixed_mul_div_floor (cairo_fixed_t a, cairo_fixed_t b, cairo_fixed_t c)
     return _cairo_int64_32_div (_cairo_int32x32_64_mul (a, b), c);
 }
 
-
+/* compute y from x so that (x,y), p1, and p2 are collinear */
 static inline cairo_fixed_t
 _cairo_edge_compute_intersection_y_for_x (const cairo_point_t *p1,
 					  const cairo_point_t *p2,
@@ -333,6 +333,7 @@ _cairo_edge_compute_intersection_y_for_x (const cairo_point_t *p1,
     return y;
 }
 
+/* compute x from y so that (x,y), p1, and p2 are collinear */
 static inline cairo_fixed_t
 _cairo_edge_compute_intersection_x_for_y (const cairo_point_t *p1,
 					  const cairo_point_t *p2,
commit e555dfc7173897bc0819c715e8897cd1c886e2a3
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Feb 26 18:42:41 2014 -0800

    Add explanation to _cairo_surface_create_in_error
    
    Patch by Homer Hsing
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50413

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index d550131..15c3c13 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2615,6 +2615,16 @@ _cairo_surface_set_resolution (cairo_surface_t *surface,
     surface->y_resolution = y_res;
 }
 
+/**
+ * _cairo_surface_create_in_error:
+ * @status: the error status
+ *
+ * Return an appropriate static error surface for the error status.
+ * On error, surface creation functions should always return a surface
+ * created with _cairo_surface_create_in_error() instead of a new surface
+ * in an error state. This simplifies internal code as no refcounting has
+ * to be done.
+ **/
 cairo_surface_t *
 _cairo_surface_create_in_error (cairo_status_t status)
 {
commit be206ddf20e7b4e0e87d91c7a18cbdb9cfcec8e6
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Feb 26 18:40:12 2014 -0800

    Add explanation to enum _cairo_int_status
    
    Patch based on suggestion by Homer Hsing
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=50416

diff --git a/src/cairo-error-private.h b/src/cairo-error-private.h
index 2d170ef..178078a 100644
--- a/src/cairo-error-private.h
+++ b/src/cairo-error-private.h
@@ -46,10 +46,13 @@
 
 CAIRO_BEGIN_DECLS
 
-/* Sure wish C had a real enum type so that this would be distinct
+/* _cairo_int_status: internal status
+ *
+ * Sure wish C had a real enum type so that this would be distinct
  * from #cairo_status_t. Oh well, without that, I'll use this bogus 100
  * offset.  We want to keep it fit in int8_t as the compiler may choose
- * that for #cairo_status_t */
+ * that for #cairo_status_t
+ */
 enum _cairo_int_status {
     CAIRO_INT_STATUS_SUCCESS = 0,
 
commit 19b31bbe7018dbe031c650e7497b19a0607ad453
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Feb 26 18:36:15 2014 -0800

    image: Fix bad HTML generation in code docs for cairo-format-stride-for-width
    
    Patch from Simon KÃ¥gedal Reimer
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63257

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index e42cc7d..1fd563d 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -422,7 +422,7 @@ _cairo_image_surface_create_with_content (cairo_content_t	content,
  * <informalexample><programlisting>
  * int stride;
  * unsigned char *data;
- * #cairo_surface_t *surface;
+ * cairo_surface_t *surface;
  *
  * stride = cairo_format_stride_for_width (format, width);
  * data = malloc (stride * height);


More information about the cairo-commit mailing list