[cairo-commit] 2 commits - src/cairo-device.c src/cairo-gl-composite.c

Benjamin Otte company at kemper.freedesktop.org
Thu Jul 8 19:21:27 PDT 2010


 src/cairo-device.c       |   32 ++++++++++++++++++++++++++++++++
 src/cairo-gl-composite.c |    4 ++--
 2 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit c1fed693020c96126cdc697ddd22567398369b04
Author: Benjamin Otte <otte at redhat.com>
Date:   Fri Jul 9 04:20:42 2010 +0200

    gl: Remove double ** from some comments
    
    gtk-doc doesn't like that unless it's a real gtk-doc comment.
    And it wasn't.

diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index 67059a7..5e3eb8f 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
@@ -60,7 +60,7 @@ _cairo_gl_create_gradient_texture (cairo_gl_surface_t *dst,
     return _cairo_gl_context_release (ctx, status);
 }
 
-/**
+/*
  * Like cairo_pattern_acquire_surface(), but returns a matrix that transforms
  * from dest to src coords.
  */
@@ -826,7 +826,7 @@ _cairo_gl_composite_begin_component_alpha  (cairo_gl_context_t *ctx,
 	setup->op = CAIRO_OPERATOR_DEST_OUT;
     }
 
-    /**
+    /*
      * implements component-alpha %CAIRO_OPERATOR_OVER using two passes of
      * the simpler operations %CAIRO_OPERATOR_DEST_OUT and %CAIRO_OPERATOR_ADD.
      *
commit 5c73b371ae31f230210987941eec2db49d2e02be
Author: Benjamin Otte <otte at redhat.com>
Date:   Fri Jul 9 04:20:06 2010 +0200

    doc: Document remaining cairo-device functions

diff --git a/src/cairo-device.c b/src/cairo-device.c
index b9f6971..d0e7066 100644
--- a/src/cairo-device.c
+++ b/src/cairo-device.c
@@ -221,6 +221,19 @@ cairo_device_status (cairo_device_t *device)
     return device->status;
 }
 
+/**
+ * cairo_device_flush:
+ * @device: a #cairo_device_t
+ *
+ * Finish any pending operations for the device and also restore any
+ * temporary modifications cairo has made to the device's state.
+ * This function must be called before switching from using the 
+ * device with Cairo to operating on it directly with native APIs.
+ * If the device doesn't support direct access, then this function
+ * does nothing.
+ *
+ * This function may acquire devices.
+ **/
 void
 cairo_device_flush (cairo_device_t *device)
 {
@@ -237,6 +250,23 @@ cairo_device_flush (cairo_device_t *device)
 }
 slim_hidden_def (cairo_device_flush);
 
+/**
+ * cairo_device_finish:
+ * @device: the #cairo_device_t to finish
+ *
+ * This function finishes the device and drops all references to
+ * external resources. All surfaces, fonts and other objects created
+ * for this @device will be finished, too.
+ * Further operations on the @device will not affect the @device but
+ * will instead trigger a %CAIRO_STATUS_DEVICE_FINISHED error.
+ *
+ * When the last call to cairo_device_destroy() decreases the
+ * reference count to zero, cairo will call cairo_device_finish() if
+ * it hasn't been called already, before freeing the resources
+ * associated with the device.
+ *
+ * This function may acquire devices.
+ **/
 void
 cairo_device_finish (cairo_device_t *device)
 {
@@ -265,6 +295,8 @@ slim_hidden_def (cairo_device_finish);
  * Decreases the reference count on @device by one. If the result is
  * zero, then @device and all associated resources are freed.  See
  * cairo_device_reference().
+ *
+ * This function may acquire devices if the last reference was dropped.
  **/
 void
 cairo_device_destroy (cairo_device_t *device)


More information about the cairo-commit mailing list