diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2010-02-15 11:48:07 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2010-02-15 11:48:07 +0100 |
commit | 916a605139b28027ec84d0c5bcf64ff6e33a94f9 (patch) | |
tree | dbe70b1dea18229ddc5407ca2f4984a473e20bef | |
parent | f38b3c0410d06d6939da12139910eb7ce48af33b (diff) | |
download | clutter-gst-916a605139b28027ec84d0c5bcf64ff6e33a94f9.tar.gz |
sink: Use COGL_TEXTURE_NO_ATLAS when creating CoglTextures
Since clutter 1.1.10, new textures might end up in a big atlas. To be
sure this does not happen for frames, we add the NO_ATLAS flag when
creating the texture.
This is just to be futureproof, the atlas does not currently fiddle with
luminance textures, but you never know.
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index b9a5574..86625fb 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -56,6 +56,15 @@ #include <glib.h> #include <string.h> +/* Flags to give to cogl_texture_new(). Since clutter 1.1.10 put NO_ATLAS to + * be sure the frames don't end up in an atlas */ +#if CLUTTER_CHECK_VERSION(1, 1, 10) +#define CLUTTER_GST_TEXTURE_FLAGS \ + (COGL_TEXTURE_NO_SLICING | COGL_TEXTURE_NO_ATLAS) +#else +#define CLUTTER_GST_TEXTURE_FLAGS COGL_TEXTURE_NO_SLICING +#endif + static gchar *ayuv_to_rgba_shader = \ FRAGMENT_SHADER_VARS "uniform sampler2D tex;" @@ -566,7 +575,7 @@ clutter_gst_yv12_upload (ClutterGstVideoSink *sink, CoglHandle y_tex = cogl_texture_new_from_data (priv->width, priv->height, - COGL_TEXTURE_NO_SLICING, + CLUTTER_GST_TEXTURE_FLAGS, COGL_PIXEL_FORMAT_G_8, COGL_PIXEL_FORMAT_G_8, y_row_stride, @@ -583,7 +592,7 @@ clutter_gst_yv12_upload (ClutterGstVideoSink *sink, priv->v_tex = cogl_texture_new_from_data (priv->width / 2, priv->height / 2, - COGL_TEXTURE_NO_SLICING, + CLUTTER_GST_TEXTURE_FLAGS, COGL_PIXEL_FORMAT_G_8, COGL_PIXEL_FORMAT_G_8, uv_row_stride, @@ -593,7 +602,7 @@ clutter_gst_yv12_upload (ClutterGstVideoSink *sink, priv->u_tex = cogl_texture_new_from_data (priv->width / 2, priv->height / 2, - COGL_TEXTURE_NO_SLICING, + CLUTTER_GST_TEXTURE_FLAGS, COGL_PIXEL_FORMAT_G_8, COGL_PIXEL_FORMAT_G_8, uv_row_stride, |