[gtk/matthiasc/color-profile-rebased: 42/46] gltexture: Improve the docs a bit




commit e9d54b4938866433f1daa08cb93b3959554333dc
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 9 08:19:44 2022 -0400

    gltexture: Improve the docs a bit

 gdk/gdkgltexture.c | 7 ++++++-
 gdk/gdkgltexture.h | 5 +++--
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c
index 4014202982..983a1f8ad5 100644
--- a/gdk/gdkgltexture.c
+++ b/gdk/gdkgltexture.c
@@ -442,6 +442,10 @@ gdk_gl_texture_determine_format (GdkGLTexture *self)
  * which will happen when the GdkTexture object is finalized, or due to
  * an explicit call of [method@Gdk.GLTexture.release].
  *
+ * The texture data is assumed to be premultiplied, not flipped, and in the
+ * sRGB colorspace, see [ctor@Gdk.GLTexture.new_with_color_profile] to override
+ * this.
+ *
  * Return value: (transfer full) (type GdkGLTexture): A newly-created
  *   `GdkTexture`
  */
@@ -472,7 +476,8 @@ gdk_gl_texture_new (GdkGLContext   *context,
  *   are released
  * @data: data that gets passed to @destroy
  *
- * Creates a new texture for an existing GL texture with a given color profile.
+ * Creates a new texture for an existing GL texture with a given color profile
+ * and flags.
  *
  * Note that the GL texture must not be modified until @destroy is called,
  * which will happen when the GdkTexture object is finalized, or due to
diff --git a/gdk/gdkgltexture.h b/gdk/gdkgltexture.h
index 6ee77910dd..fa1c529e1f 100644
--- a/gdk/gdkgltexture.h
+++ b/gdk/gdkgltexture.h
@@ -51,8 +51,9 @@ GdkTexture *            gdk_gl_texture_new                     (GdkGLContext
 
 /**
  * GdkGLTextureFlags:
- * @GDK_GL_TEXTURE_FLAGS_PREMULTIPLIED: The alpha in the data is not premultiplied
- * @GDK_GL_TEXTURE_FLAGS_FLIPPED: The data has the origin at the bottom
+ * @GDK_GL_TEXTURE_FLAGS_PREMULTIPLIED: The alpha in the data is premultiplied
+ * @GDK_GL_TEXTURE_FLAGS_FLIPPED: The data has the origin at the bottom (this is usually
+ *   th case for textures that are produced by GL rendering)
  *
  * Flags that describe the content of a GL texture.
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]