mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
Cleaned up repar_win
Uncommented path for TFP; fixed leak of parts regions; removed unnecessary 'damaged' flag.
This commit is contained in:
parent
121a65e4f4
commit
030afac8ab
@ -131,7 +131,6 @@ typedef struct _MetaCompWindow
|
|||||||
Damage damage;
|
Damage damage;
|
||||||
|
|
||||||
gboolean needs_shadow : 1;
|
gboolean needs_shadow : 1;
|
||||||
gboolean damaged : 1;
|
|
||||||
gboolean shaped : 1;
|
gboolean shaped : 1;
|
||||||
gboolean destroy_pending : 1;
|
gboolean destroy_pending : 1;
|
||||||
|
|
||||||
@ -534,7 +533,6 @@ map_win (MetaDisplay *display,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
cw->attrs.map_state = IsViewable;
|
cw->attrs.map_state = IsViewable;
|
||||||
cw->damaged = FALSE;
|
|
||||||
|
|
||||||
if (cw->back_pixmap)
|
if (cw->back_pixmap)
|
||||||
{
|
{
|
||||||
@ -566,7 +564,6 @@ unmap_win (MetaDisplay *display,
|
|||||||
info->focus_window = NULL;
|
info->focus_window = NULL;
|
||||||
|
|
||||||
cw->attrs.map_state = IsUnmapped;
|
cw->attrs.map_state = IsUnmapped;
|
||||||
cw->damaged = FALSE;
|
|
||||||
|
|
||||||
free_win (cw, FALSE);
|
free_win (cw, FALSE);
|
||||||
|
|
||||||
@ -615,7 +612,6 @@ add_win (MetaScreen *screen,
|
|||||||
|
|
||||||
XSelectInput (xdisplay, xwindow, event_mask);
|
XSelectInput (xdisplay, xwindow, event_mask);
|
||||||
|
|
||||||
cw->damaged = FALSE;
|
|
||||||
cw->shaped = is_shaped (display, xwindow);
|
cw->shaped = is_shaped (display, xwindow);
|
||||||
|
|
||||||
if (cw->attrs.class == InputOnly)
|
if (cw->attrs.class == InputOnly)
|
||||||
@ -737,41 +733,38 @@ repair_win (MetaCompWindow *cw)
|
|||||||
clutter_actor_show (cw->actor);
|
clutter_actor_show (cw->actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cw->damaged)
|
/*
|
||||||
{
|
* TODO -- on some gfx hardware updating the whole texture instead of
|
||||||
XDamageSubtract (xdisplay, cw->damage, None, None);
|
* the individual rectangles is actually quicker, so we might want to
|
||||||
}
|
* make this a configurable option (on desktop HW with multiple pipelines
|
||||||
else
|
* it is usually quicker to just update the damaged parts).
|
||||||
{
|
*
|
||||||
XRectangle *r_damage;
|
* If we are using TFP we update the whole texture (this simply trigers
|
||||||
XRectangle r_bounds;
|
* the texture rebind).
|
||||||
int i, r_count;
|
*/
|
||||||
XserverRegion parts;
|
if (CLUTTER_GLX_IS_TEXTURE_PIXMAP (cw->actor) &&
|
||||||
#if 0
|
clutter_glx_texture_pixmap_using_extension (
|
||||||
if (clutter_glx_texture_pixmap_using_extension (
|
|
||||||
CLUTTER_GLX_TEXTURE_PIXMAP (cw->actor)))
|
CLUTTER_GLX_TEXTURE_PIXMAP (cw->actor)))
|
||||||
{
|
{
|
||||||
clutter_actor_queue_redraw (cw->actor);
|
|
||||||
XDamageSubtract (xdisplay, cw->damage, None, None);
|
XDamageSubtract (xdisplay, cw->damage, None, None);
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
parts = XFixesCreateRegion (xdisplay, 0, 0);
|
|
||||||
XDamageSubtract (xdisplay, cw->damage, None, parts);
|
|
||||||
|
|
||||||
if (1) /* clutter_glx_texture_pixmap_using_extension
|
|
||||||
(CLUTTER_GLX_TEXTURE_PIXMAP (cw->actor))) */
|
|
||||||
{
|
|
||||||
clutter_x11_texture_pixmap_update_area
|
clutter_x11_texture_pixmap_update_area
|
||||||
(CLUTTER_X11_TEXTURE_PIXMAP (cw->actor),
|
(CLUTTER_X11_TEXTURE_PIXMAP (cw->actor),
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
clutter_actor_get_width (cw->actor),
|
clutter_actor_get_width (cw->actor),
|
||||||
clutter_actor_get_height (cw->actor));
|
clutter_actor_get_height (cw->actor));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
XRectangle *r_damage;
|
||||||
|
XRectangle r_bounds;
|
||||||
|
XserverRegion parts;
|
||||||
|
int i, r_count;
|
||||||
|
|
||||||
|
parts = XFixesCreateRegion (xdisplay, 0, 0);
|
||||||
|
XDamageSubtract (xdisplay, cw->damage, None, parts);
|
||||||
|
|
||||||
r_damage = XFixesFetchRegionAndBounds (xdisplay,
|
r_damage = XFixesFetchRegionAndBounds (xdisplay,
|
||||||
parts,
|
parts,
|
||||||
&r_count,
|
&r_count,
|
||||||
@ -791,12 +784,10 @@ repair_win (MetaCompWindow *cw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XFree (r_damage);
|
XFree (r_damage);
|
||||||
}
|
XFixesDestroyRegion (xdisplay, parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_error_trap_pop (display, FALSE);
|
meta_error_trap_pop (display, FALSE);
|
||||||
|
|
||||||
cw->damaged = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -998,7 +989,6 @@ process_property_notify (MetaCompositorClutter *compositor,
|
|||||||
|
|
||||||
clutter_actor_set_opacity (cw->actor, 200); /* FIXME */
|
clutter_actor_set_opacity (cw->actor, 200); /* FIXME */
|
||||||
|
|
||||||
cw->damaged = TRUE;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user