[cairo] [PATCH 4/7] skia: Add section definitions and code docs for skia backend

Uli Schlachter psychon at znc.in
Thu Feb 27 00:40:21 PST 2014


On 26.02.2014 23:29, Bryce W. Harrington wrote:
> This fixes several distcheck errors regarding missing code docs.
> 
> Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
> ---
>  doc/public/cairo-sections.txt |    5 +++--
>  src/cairo-skia-surface.cpp    |   21 +++++++++++++++++++++
>  src/skia/cairo-skia-private.h |   19 +++++++++++++++++++
>  3 files changed, 43 insertions(+), 2 deletions(-)
> 
> 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..59b0c67 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.12
> + **/

I disagree:

commit d7faec024ac9f702c9bb305599ef8960a972491a
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date:   Mon Jun 15 11:15:22 2009 +0100

    Add skia backend

    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.

    [updated by Chris Wilson]

$ git describe --contains d7faec024ac9f702c9bb305599ef8960a972491a
1.9.4~166^2~36

Also, there is cairo-skia.h in cairo 1.10, as evident by:

$ git show 1.10.0:src/cairo-skia.h

>  #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..79aa2eb 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.12
> + **/
>  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.12
> + **/
>  typedef struct _cairo_skia_surface cairo_skia_surface_t;
>  
>  struct _cairo_skia_context {
> 


-- 
Sent from my Game Boy.


More information about the cairo mailing list