[cairo-commit] 2 commits - doc/public src/cairo-cache-private.h src/cairo.h src/cairo-raster-source-pattern.c src/cairo-region.c src/cairo-skia-surface.cpp src/cairo-types-private.h src/skia

Bryce Harrington bryce at kemper.freedesktop.org
Thu Mar 13 17:12:56 PDT 2014


 doc/public/cairo-sections.txt     |    5 +++--
 src/cairo-cache-private.h         |    2 +-
 src/cairo-raster-source-pattern.c |    2 --
 src/cairo-region.c                |   12 ------------
 src/cairo-skia-surface.cpp        |   21 +++++++++++++++++++++
 src/cairo-types-private.h         |    4 ++--
 src/cairo.h                       |   11 +++++++++++
 src/skia/cairo-skia-private.h     |   19 +++++++++++++++++++
 8 files changed, 57 insertions(+), 19 deletions(-)

New commits:
commit bc05dbccd7dd2f137038479b30ed71c98ff81da6
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Feb 27 10:56:20 2014 +0100

    Fix warnings from check-doc-syntax.sh
    
    $ ./check-doc-syntax.sh
    Checking documentation for incorrect syntax
    ./cairo-types-private.h (148): WARNING: cairo_hash_entry_t: missing 'Since' field (is it a private type?)
    ./cairo-types-private.h (161): WARNING: cairo_hash_entry_t: not found
    ./cairo-types-private.h (175): WARNING: cairo_lcd_filter_t: missing 'Since' field (is it a private type?)
    ./cairo-cache-private.h (85): WARNING: cairo_cache_entry_t: missing 'Since' field (is it a private type?)
    ./cairo-region.c (857): WARNING: cairo_region_overlap_t: not found
    ./cairo-raster-source-pattern.c (62): WARNING: SECTION:cairo-raster-source 'Since' field in non-public element
    
    The warnings about missing 'Since' fields are fixed by changing the
    documentation comment so that the script can see that these are private types.
    
    The documentation for cairo_region_overlap_t gets moved to cairo.h, just like
    e.g. the documentation for cairo_status_t.
    
    The 'Since' field from the SECTION:cairo-raster-source is removed, because this
    kind of field is needed on the individual functions and structs, not on the
    section.
    
    Thanks to Bryce Harrington for bringing this up!
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>
    Tested-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-cache-private.h b/src/cairo-cache-private.h
index 76b5561..24b6d0b 100644
--- a/src/cairo-cache-private.h
+++ b/src/cairo-cache-private.h
@@ -43,7 +43,7 @@
 #include "cairo-types-private.h"
 
 /**
- * cairo_cache_entry_t:
+ * _cairo_cache_entry:
  *
  * A #cairo_cache_entry_t contains both a key and a value for
  * #cairo_cache_t. User-derived types for #cairo_cache_entry_t must
diff --git a/src/cairo-raster-source-pattern.c b/src/cairo-raster-source-pattern.c
index 601fe60..64520fe 100644
--- a/src/cairo-raster-source-pattern.c
+++ b/src/cairo-raster-source-pattern.c
@@ -57,8 +57,6 @@
  * Other callbacks are provided for when the pattern is copied temporarily
  * during rasterisation, or more permanently as a snapshot in order to keep
  * the pixel data available for printing.
- *
- * Since: 1.12
  **/
 
 cairo_surface_t *
diff --git a/src/cairo-region.c b/src/cairo-region.c
index ceaf4c0..ccfb220 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -842,18 +842,6 @@ cairo_region_translate (cairo_region_t *region,
 slim_hidden_def (cairo_region_translate);
 
 /**
- * cairo_region_overlap_t:
- * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10)
- * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10)
- * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and
- *     partially outside the region. (Since 1.10)
- *
- * Used as the return value for cairo_region_contains_rectangle().
- *
- * Since: 1.10
- **/
-
-/**
  * cairo_region_contains_rectangle:
  * @region: a #cairo_region_t
  * @rectangle: a #cairo_rectangle_int_t
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h
index 3c2d21a..3d15d96 100644
--- a/src/cairo-types-private.h
+++ b/src/cairo-types-private.h
@@ -113,7 +113,7 @@ struct _cairo_observer {
 };
 
 /**
- * cairo_hash_entry_t:
+ * _cairo_hash_entry:
  *
  * A #cairo_hash_entry_t contains both a key and a value for
  * #cairo_hash_table_t. User-derived types for #cairo_hash_entry_t must
@@ -158,7 +158,7 @@ struct _cairo_array {
 };
 
 /**
- * cairo_lcd_filter_t:
+ * _cairo_lcd_filter:
  * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for
  *   font backend and target device
  * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering
diff --git a/src/cairo.h b/src/cairo.h
index aa2070e..3104d47 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -3048,6 +3048,17 @@ cairo_matrix_transform_point (const cairo_matrix_t *matrix,
  **/
 typedef struct _cairo_region cairo_region_t;
 
+/**
+ * cairo_region_overlap_t:
+ * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10)
+ * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10)
+ * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and
+ *     partially outside the region. (Since 1.10)
+ *
+ * Used as the return value for cairo_region_contains_rectangle().
+ *
+ * Since: 1.10
+ **/
 typedef enum _cairo_region_overlap {
     CAIRO_REGION_OVERLAP_IN,		/* completely inside region */
     CAIRO_REGION_OVERLAP_OUT,		/* completely outside region */
commit 0c189910539aa05125b60e59b7101e9b9685582f
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Thu Mar 13 15:22:40 2014 -0700

    skia: Add section definitions and code docs for skia backend
    
    This fixes several distcheck errors regarding missing code docs.
    
    The skia backend was added in commit d7faec02, which was included in the
    1.10 release.
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/doc/public/cairo-sections.txt b/doc/public/cairo-sections.txt
index 3a78f36..4beaa0a 100644
--- a/doc/public/cairo-sections.txt
+++ b/doc/public/cairo-sections.txt
@@ -115,11 +115,12 @@ cairo_recording_surface_get_extents
 
 <SECTION>
 <FILE>cairo-skia</FILE>
-cairo_skia_context
 cairo_skia_context_t
-cairo_skia_surface
 cairo_skia_surface_t
 format_to_sk_config
+<SUBSECTION Private>
+cairo_skia_context
+cairo_skia_surface
 </SECTION>
 
 <SECTION>
diff --git a/src/cairo-skia-surface.cpp b/src/cairo-skia-surface.cpp
index bf6b14a..4cf8b7f 100644
--- a/src/cairo-skia-surface.cpp
+++ b/src/cairo-skia-surface.cpp
@@ -51,6 +51,27 @@
 #include <SkGradientShader.h>
 #include <SkDashPathEffect.h>
 
+/**
+ * SECTION:cairo-skia
+ * @Title: Skia Surfaces
+ * @Short_Description: Rendering to Skia surfaces
+ * @See_Also: #cairo_surface_t
+ *
+ * Originally written by Vladimir Vukicevic to investigate using Skia for
+ * Mozilla, it provides a nice integration with a rather interesting code
+ * base. By hooking Skia underneath Cairo it allows us to directly compare
+ * code paths... which is interesting.
+ **/
+
+/**
+ * CAIRO_HAS_SKIA_SURFACE:
+ *
+ * Defined if the Skia surface backend is available.
+ * This macro can be used to conditionally compile backend-specific code.
+ *
+ * Since: 1.10
+ **/
+
 #if (CAIRO_FIXED_BITS == 32) && (CAIRO_FIXED_FRAC_BITS == 16) && defined(SK_SCALAR_IS_FIXED)
 # define CAIRO_FIXED_TO_SK_SCALAR(x)  (x)
 #elif defined(SK_SCALAR_IS_FIXED)
diff --git a/src/skia/cairo-skia-private.h b/src/skia/cairo-skia-private.h
index cbd8c88..de3897b 100644
--- a/src/skia/cairo-skia-private.h
+++ b/src/skia/cairo-skia-private.h
@@ -44,7 +44,26 @@
 #include <SkPaint.h>
 #include <SkPath.h>
 
+/**
+ * cairo_skia_context_t:
+ *
+ * A #cairo_skia_context_t includes handles to Skia's canvas,
+ * paint, and path objects along with the Cairo source surfaces
+ * and matrix, and the original and target #cairo_skia_surface_t
+ * objects.
+ *
+ * Since: 1.10
+ **/
 typedef struct _cairo_skia_context cairo_skia_context_t;
+
+/**
+ * cairo_skia_surface_t:
+ *
+ * A #cairo_skia_surface_t is a container for the underlying
+ * #SkBitmap and the corresponding Cairo image surface.
+ *
+ * Since: 1.10
+ **/
 typedef struct _cairo_skia_surface cairo_skia_surface_t;
 
 struct _cairo_skia_context {


More information about the cairo-commit mailing list