[clutter] texture: Deprecate YUV setter
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] texture: Deprecate YUV setter
- Date: Tue, 31 Jan 2012 11:10:52 +0000 (UTC)
commit 1d84bf2b04e614a93527f6c36f5a7d686a5f7cfd
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Jan 31 10:28:04 2012 +0000
texture: Deprecate YUV setter
The YUV support depends on the driver support, and not only not many
drivers support YUV natively: the supported colorspaces are pretty much
useless.
The proper way to do YUV to RGB colorspace conversion on the GPU is to
use a fragment shader; for that, ClutterTexture and Cogl provide enough
API to achieve a good result - see the Clutter-GStreamer implementation,
for instance.
clutter/clutter-texture.c | 11 +++++++++++
clutter/clutter-texture.h | 15 +++++++++------
2 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c
index 53bdb1b..b8a8035 100644
--- a/clutter/clutter-texture.c
+++ b/clutter/clutter-texture.c
@@ -1666,9 +1666,20 @@ clutter_texture_set_from_rgb_data (ClutterTexture *texture,
* Sets a #ClutterTexture from YUV image data. If an error occurred,
* %FALSE is returned and @error is set.
*
+ * The YUV support depends on the driver; the format supported by the
+ * few drivers exposing this capability are not really useful.
+ *
+ * The proper way to convert image data in any YUV colorspace to any
+ * RGB colorspace is to use a fragment shader associated with the
+ * #ClutterTexture material.
+ *
* Return value: %TRUE if the texture was successfully updated
*
* Since: 0.4
+ *
+ * Deprecated: 1.10: Use clutter_texture_get_cogl_material() and
+ * the Cogl API to install a fragment shader for decoding YUV
+ * formats on the GPU
*/
gboolean
clutter_texture_set_from_yuv_data (ClutterTexture *texture,
diff --git a/clutter/clutter-texture.h b/clutter/clutter-texture.h
index c766a3d..70f8ca3 100644
--- a/clutter/clutter-texture.h
+++ b/clutter/clutter-texture.h
@@ -142,12 +142,6 @@ gboolean clutter_texture_set_from_rgb_data (ClutterTexture
gint bpp,
ClutterTextureFlags flags,
GError **error);
-gboolean clutter_texture_set_from_yuv_data (ClutterTexture *texture,
- const guchar *data,
- gint width,
- gint height,
- ClutterTextureFlags flags,
- GError **error);
gboolean clutter_texture_set_area_from_rgb_data (ClutterTexture *texture,
const guchar *data,
gboolean has_alpha,
@@ -159,6 +153,15 @@ gboolean clutter_texture_set_area_from_rgb_data (ClutterTexture
gint bpp,
ClutterTextureFlags flags,
GError **error);
+
+CLUTTER_DEPRECATED
+gboolean clutter_texture_set_from_yuv_data (ClutterTexture *texture,
+ const guchar *data,
+ gint width,
+ gint height,
+ ClutterTextureFlags flags,
+ GError **error);
+
void clutter_texture_get_base_size (ClutterTexture *texture,
gint *width,
gint *height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]