mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2008-01-21 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-group.c: Make sure unrealizing a group also unrealizes children. * clutter/glx/clutter-stage-glx.c: Chain up to group unrealize to make sure textures get unrealized when changing context (see #718) * clutter/clutter-texture.c: Formatting cleanups
This commit is contained in:
parent
e58d0d7f34
commit
b9d1cb9612
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2008-01-21 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* clutter/clutter-group.c:
|
||||
Make sure unrealizing a group also unrealizes children.
|
||||
|
||||
* clutter/glx/clutter-stage-glx.c:
|
||||
Chain up to group unrealize to make sure textures get unrealized
|
||||
when changing context (see #718)
|
||||
|
||||
* clutter/clutter-texture.c:
|
||||
Formatting cleanups
|
||||
|
||||
2008-01-21 Øyvind Kolås <pippin@gimp.org>
|
||||
|
||||
* tests/test-shader.c: fix incompatible types in shader programs
|
||||
|
@ -108,6 +108,14 @@ clutter_group_paint (ClutterActor *actor)
|
||||
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave");
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_group_unrealize (ClutterActor *actor)
|
||||
{
|
||||
clutter_container_foreach (CLUTTER_CONTAINER (actor),
|
||||
CLUTTER_CALLBACK (clutter_actor_unrealize),
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_group_pick (ClutterActor *actor,
|
||||
const ClutterColor *color)
|
||||
@ -428,6 +436,7 @@ clutter_group_class_init (ClutterGroupClass *klass)
|
||||
actor_class->hide_all = clutter_group_real_hide_all;
|
||||
actor_class->request_coords = clutter_group_request_coords;
|
||||
actor_class->query_coords = clutter_group_query_coords;
|
||||
actor_class->unrealize = clutter_group_unrealize;
|
||||
|
||||
/**
|
||||
* ClutterGroup::add:
|
||||
|
@ -1117,7 +1117,9 @@ pixbuf_destroy_notify (guchar *pixels, gpointer data)
|
||||
* 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)
|
||||
@ -1363,8 +1365,9 @@ clutter_texture_set_from_rgb_data (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;
|
||||
}
|
||||
@ -1914,35 +1917,33 @@ texture_update_data (ClutterTexture *texture,
|
||||
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;
|
||||
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include "../clutter-debug.h"
|
||||
#include "../clutter-units.h"
|
||||
#include "../clutter-shader.h"
|
||||
#include "../clutter-group.h"
|
||||
#include "../clutter-container.h"
|
||||
|
||||
#include "cogl.h"
|
||||
|
||||
@ -59,6 +61,11 @@ clutter_stage_glx_unrealize (ClutterActor *actor)
|
||||
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user