summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-04-21 22:09:14 +0200
committerDennis Kasprzyk <onestone@opencompositing.org>2008-04-21 22:09:14 +0200
commitd9865349f8f6d1c3c7041644eeb6425a66e0a8ab (patch)
tree2570b06decdf8d5d5db56b166f65ca9bbbd7181b
parent8608a8553ad08d178fabef35384ea3f0fe624011 (diff)
download3d-d9865349f8f6d1c3c7041644eeb6425a66e0a8ab.tar.gz
3d-d9865349f8f6d1c3c7041644eeb6425a66e0a8ab.tar.bz2
Damage screen only during animation.
-rw-r--r--3d.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/3d.c b/3d.c
index 6a794a7..d489dc1 100644
--- a/3d.c
+++ b/3d.c
@@ -78,6 +78,7 @@ typedef struct _tdScreen
float basicScale;
float maxDepth;
+ Bool damage;
Bool withDepth;
@@ -161,6 +162,7 @@ tdPreparePaintScreen (CompScreen *s,
minScale = MAX (minScale, 1.0 - (tds->maxDepth * maxDiv));
tds->basicScale = 1.0 - ((1.0 - minScale) * progress);
+ tds->damage = (progress != 0.0 && progress != 1.0);
}
else
{
@@ -663,8 +665,11 @@ tdDonePaintScreen (CompScreen *s)
{
TD_SCREEN (s);
- if (tds->active)
+ if (tds->active && tds->damage)
+ {
+ tds->damage = FALSE;
damageScreen (s);
+ }
UNWRAP (tds, s, donePaintScreen);
(*s->donePaintScreen) (s);