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.
This commit is contained in:
Emmanuele Bassi 2012-01-31 10:28:04 +00:00
parent c95b126571
commit 1d84bf2b04
2 changed files with 20 additions and 6 deletions

View File

@ -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,

View File

@ -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);