Small documentation fixes
authorEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 11 Dec 2008 15:51:24 +0000 (15:51 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 11 Dec 2008 15:51:24 +0000 (15:51 +0000)
Fix the CairoTexture description, and some of the comments inside
the code, especially with regards to the alpha channel unpremultiplication
that we have to perform each time we upload the image surface to
GL.

clutter/clutter-cairo-texture.c

index 1aa15b7..8e3b6c9 100644 (file)
  *
  * #ClutterCairoTexture will provide a #cairo_t context by using the
  * clutter_cairo_texture_create() and clutter_cairo_texture_create_region()
- * functions; you can use the Cairo API to draw on the context.
+ * functions; you can use the Cairo API to draw on the context and then
+ * call cairo_destroy() when done.
  *
  * As soon as the context is destroyed with cairo_destroy(), the contents
- * of the context will be uploaded into the #ClutterCairoTexture actor:
+ * of the surface will be uploaded into the #ClutterCairoTexture actor:
  *
  * |[
  *   cairo_t *cr;
@@ -410,7 +411,8 @@ clutter_cairo_texture_init (ClutterCairoTexture *self)
 
   /* FIXME - we are hardcoding the format; it would be good to have
    * a :surface-format construct-only property for creating
-   * textures with a different format
+   * textures with a different format and have the cairo surface
+   * match that format
    */
   priv->format = CAIRO_FORMAT_ARGB32;
 }
@@ -475,7 +477,12 @@ clutter_cairo_texture_context_destroy (void *data)
   /* BAH BAH BAH ! un-pre-multiply alpha...
    *
    * FIXME: Need to figure out if GL has a premult texture
-   *        format... or go back to battling glitz
+   *        format, or we need to change the order of the
+   *        paint sequence in Clutter. or go back to battling
+   *        glitz (ugh).
+   *
+   * in theory, this could be moved to a shader, but apparently
+   * the performance gain is not really worth it.
    */
   for (y = 0; y < cairo_height; y++)
     {