mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2008-06-03 Matthew Allum <mallum@openedhand.com>
* clutter/glx/clutter-glx-texture-pixmap.c: Dont always fallback to x11 (slow) updates for a single failed pixmap. Minor cleanups. * clutter/x11/clutter-x11-texture-pixmap.c: Move shm allocation to only area updates.
This commit is contained in:
parent
474ae2d17e
commit
437fa9239f
@ -1,3 +1,12 @@
|
||||
2008-06-03 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* clutter/glx/clutter-glx-texture-pixmap.c:
|
||||
Dont always fallback to x11 (slow) updates for a single
|
||||
failed pixmap.
|
||||
Minor cleanups.
|
||||
* clutter/x11/clutter-x11-texture-pixmap.c:
|
||||
Move shm allocation to only area updates.
|
||||
|
||||
2008-06-03 Øyvind Kolås <pippin@o-hand.com>
|
||||
|
||||
* clutter/clutter-container.c: (container_get_child_property):
|
||||
|
@ -439,12 +439,15 @@ clutter_glx_texture_pixmap_create_glx_pixmap (ClutterGLXTexturePixmap *texture)
|
||||
|
||||
dpy = clutter_x11_get_default_display ();
|
||||
|
||||
priv->use_fallback = FALSE;
|
||||
|
||||
g_object_get (texture,
|
||||
"pixmap-width", &pixmap_width,
|
||||
"pixmap-height", &pixmap_height,
|
||||
"pixmap-depth", &depth,
|
||||
"pixmap", &pixmap,
|
||||
NULL);
|
||||
|
||||
if (!pixmap)
|
||||
{
|
||||
goto cleanup;
|
||||
@ -545,6 +548,7 @@ clutter_glx_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
|
||||
|
||||
if (priv->use_fallback)
|
||||
{
|
||||
CLUTTER_NOTE (TEXTURE, "Falling back to X11..");
|
||||
parent_class->update_area (texture,
|
||||
x, y,
|
||||
width, height);
|
||||
@ -556,6 +560,8 @@ clutter_glx_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
|
||||
|
||||
if (texture_bind (CLUTTER_GLX_TEXTURE_PIXMAP(texture)))
|
||||
{
|
||||
CLUTTER_NOTE (TEXTURE, "Really updating via GLX");
|
||||
|
||||
clutter_x11_trap_x_errors ();
|
||||
|
||||
(_gl_bind_tex_image) (dpy,
|
||||
|
@ -553,6 +553,9 @@ clutter_x11_texture_pixmap_update_area_real (ClutterX11TexturePixmap *texture,
|
||||
if (!priv->pixmap)
|
||||
return;
|
||||
|
||||
if (priv->shminfo.shmid == -1)
|
||||
try_alloc_shm (texture);
|
||||
|
||||
clutter_x11_trap_x_errors ();
|
||||
|
||||
if (priv->have_shm)
|
||||
@ -855,19 +858,28 @@ clutter_x11_texture_pixmap_set_pixmap (ClutterX11TexturePixmap *texture,
|
||||
g_object_unref (texture);
|
||||
|
||||
free_shm_resources (texture);
|
||||
if (pixmap != None)
|
||||
try_alloc_shm (texture);
|
||||
|
||||
if (priv->depth != 0 &&
|
||||
priv->pixmap != None &&
|
||||
priv->pixmap_width != 0 &&
|
||||
priv->pixmap_height != 0)
|
||||
{
|
||||
gboolean sync_size = TRUE;
|
||||
|
||||
if (CLUTTER_ACTOR_IS_REALIZED (texture))
|
||||
clutter_x11_texture_pixmap_update_area (texture,
|
||||
0, 0,
|
||||
priv->pixmap_width,
|
||||
priv->pixmap_height);
|
||||
|
||||
#if 0
|
||||
/* Borked - externally resizing resets this prop.. */
|
||||
g_object_get (texture, "sync-size", &sync_size, NULL);
|
||||
|
||||
/*if (sync_size)*/
|
||||
clutter_actor_set_size (CLUTTER_ACTOR(texture),
|
||||
priv->pixmap_width, priv->pixmap_height);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -897,39 +909,6 @@ clutter_x11_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
|
||||
g_signal_emit (texture, signals[UPDATE_AREA], 0, x, y, width, height);
|
||||
}
|
||||
|
||||
/* FIXME: to implement */
|
||||
void
|
||||
clutter_x11_texture_pixmap_set_from_window (ClutterX11TexturePixmap *texture,
|
||||
Window win,
|
||||
gboolean reflect)
|
||||
{
|
||||
ClutterX11TexturePixmapPrivate *priv;
|
||||
|
||||
g_return_if_fail (CLUTTER_X11_IS_TEXTURE_PIXMAP (texture));
|
||||
|
||||
/* This would mainly be used for compositing type situations
|
||||
* with named pixmap (cannot be regular pixmap) and setting up
|
||||
* actual window redirection.
|
||||
*
|
||||
* It also seems to can pass a window to texture_pixmap and it
|
||||
* it works like redirectwindow automatic.
|
||||
*
|
||||
* Note windows do however change size, whilst pixmaps do not.
|
||||
*/
|
||||
|
||||
priv = texture->priv;
|
||||
|
||||
/*
|
||||
priv->window_pixmap = XCompositeNameWindowPixmap (dpy, win);
|
||||
|
||||
XCompositeRedirectWindow(clutter_x11_get_default_display(),
|
||||
win_remote,
|
||||
CompositeRedirectAutomatic);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* FIXME: Below will change, just proof of concept atm - it will not work
|
||||
* 100% for named pixmaps.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user