* Gets a #GdkPixbuf representation of the #ClutterTexture data.
* The created #GdkPixbuf is not owned by the texture but the caller.
*
- * Return value: A #GdkPixbuf
+ * Note: NULL is always returned with OpenGL ES.
+ *
+ * Return value: A #GdkPixbuf or NULL on fail.
**/
GdkPixbuf*
clutter_texture_get_pixbuf (ClutterTexture* texture)
gboolean texture_dirty = TRUE, size_change = FALSE;
priv = texture->priv;
- if (!texture_prepare_upload (TRUE, texture, data, has_alpha, width, height, rowstride,
- bpp, flags, ©_data, &texture_dirty, &size_change))
+ if (!texture_prepare_upload (TRUE, texture, data, has_alpha,
+ width, height, rowstride, bpp, flags,
+ ©_data, &texture_dirty, &size_change))
{
return FALSE;
}
gint effective_y;
gint effective_height;
-
/*
--- first tile --
-|--------------------- priv->width ------------------------------|
-| <- priv->x_tiles[x].pos
-|-----------| <- priv->x_tiles[x].size
-|-------| <- x_0
- |------------| <- width
-|--------------------| <- x_0 + width
-|-------| <- master_offset = -8
-|-------| <- effective_x = 8
- |---| <- effective_width
-
--- second tile ---
-
-|--------------------- priv->width ------------------------------|
-|-----------| <- priv->x_tiles[x].pos
- |-----------| <- priv->x_tiles[x].size (src_w)
-|-------| <- x_0
- |------------| <- width
-|--------------------| <- x_0 + width
- |---| <- master_offset = 4
- | <- effective_x (0 in between)
- |--------| <- effective_width
-
-
- XXXXXXXXXXXXXX <- master
-|___________|___________|___________|___________|___________|_____%%%%%%|
-*/
+ * -- first tile --
+ * |--------------------- priv->width ------------------------------|
+ * | <- priv->x_tiles[x].pos
+ * |-----------| <- priv->x_tiles[x].size
+ * |-------| <- x_0
+ * |------------| <- width
+ * |--------------------| <- x_0 + width
+ * |-------| <- master_offset = -8
+ * |-------| <- effective_x = 8
+ * |---| <- effective_width
+ *
+ * -- second tile ---
+ *
+ * |--------------------- priv->width ------------------------------|
+ * |-----------| <- priv->x_tiles[x].pos
+ * |-----------| <- priv->x_tiles[x].size (src_w)
+ * |-------| <- x_0
+ * |------------| <- width
+ * |--------------------| <- x_0 + width
+ * |---| <- master_offset = 4
+ * | <- effective_x (0 in between)
+ * |--------| <- effective_width
+ *
+ * XXXXXXXXXXXXXX <- master
+ * |___________|___________|___________|___________|___________|_____%%%%%%|
+ */
gint src_w, src_h;
#include "../clutter-debug.h"
#include "../clutter-units.h"
#include "../clutter-shader.h"
+#include "../clutter-group.h"
+#include "../clutter-container.h"
#include "cogl.h"
g_object_get (actor, "offscreen", &was_offscreen, NULL);
+ /* Chain up so all children get unrealized, needed to move texture data
+ * across contexts
+ */
+ CLUTTER_ACTOR_CLASS (clutter_stage_glx_parent_class)->unrealize (actor);
+
clutter_x11_trap_x_errors ();
/* Unrealize all shaders, since the GL context is going away */