mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
surface-actor-wayland: Fix meta_surface_actor_wayland_is_argb32
This prevents us from clipping shadows under windows for all apps, and loads of other fun optimizations.
This commit is contained in:
parent
42491f7724
commit
1cfaf45389
@ -83,8 +83,21 @@ meta_surface_actor_wayland_pre_paint (MetaSurfaceActor *actor)
|
||||
static gboolean
|
||||
meta_surface_actor_wayland_is_argb32 (MetaSurfaceActor *actor)
|
||||
{
|
||||
/* XXX -- look at the SHM buffer format. */
|
||||
MetaShapedTexture *stex = meta_surface_actor_get_texture (actor);
|
||||
CoglTexture *texture = meta_shaped_texture_get_texture (stex);
|
||||
|
||||
switch (cogl_texture_get_components (texture))
|
||||
{
|
||||
case COGL_TEXTURE_COMPONENTS_A:
|
||||
case COGL_TEXTURE_COMPONENTS_RGBA:
|
||||
return TRUE;
|
||||
case COGL_TEXTURE_COMPONENTS_RG:
|
||||
case COGL_TEXTURE_COMPONENTS_RGB:
|
||||
case COGL_TEXTURE_COMPONENTS_DEPTH:
|
||||
return FALSE;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user