[clutter] clutter-actor: Add a debug flag for disabling offscreen redirect
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] clutter-actor: Add a debug flag for disabling offscreen redirect
- Date: Fri, 17 Jun 2011 11:17:44 +0000 (UTC)
commit 1e2e0f21b86857354450beb7da78eb0fbbc95c06
Author: Neil Roberts <neil linux intel com>
Date: Mon Jun 6 18:22:20 2011 +0100
clutter-actor: Add a debug flag for disabling offscreen redirect
This adds CLUTTER_PAINT=disable-offscreen-redirect to help diagnose
problems with the correct opacity changes. This just makes it so that
it never installs the flatten effect so it will never automatically
redirect an actor offscreen.
clutter/clutter-actor.c | 4 ++++
clutter/clutter-debug.h | 3 ++-
clutter/clutter-main.c | 3 ++-
3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 81ba12b..bf34d32 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -2700,6 +2700,10 @@ needs_flatten_effect (ClutterActor *self)
{
ClutterActorPrivate *priv = self->priv;
+ if (G_UNLIKELY (clutter_paint_debug_flags &
+ CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT))
+ return FALSE;
+
switch (priv->offscreen_redirect)
{
case CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY:
diff --git a/clutter/clutter-debug.h b/clutter/clutter-debug.h
index f3ee805..9ee1e44 100644
--- a/clutter/clutter-debug.h
+++ b/clutter/clutter-debug.h
@@ -39,7 +39,8 @@ typedef enum {
CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1,
CLUTTER_DEBUG_REDRAWS = 1 << 2,
CLUTTER_DEBUG_PAINT_VOLUMES = 1 << 3,
- CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4
+ CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4,
+ CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5
} ClutterDrawDebugFlag;
#ifdef CLUTTER_ENABLE_DEBUG
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index b7a63f4..934ca26 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -180,7 +180,8 @@ static const GDebugKey clutter_paint_debug_keys[] = {
{ "disable-clipped-redraws", CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS },
{ "redraws", CLUTTER_DEBUG_REDRAWS },
{ "paint-volumes", CLUTTER_DEBUG_PAINT_VOLUMES },
- { "disable-culling", CLUTTER_DEBUG_DISABLE_CULLING }
+ { "disable-culling", CLUTTER_DEBUG_DISABLE_CULLING },
+ { "disable-offscreen-redirect", CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT }
};
#ifdef CLUTTER_ENABLE_PROFILE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]