Merge lp:~smspillaz/compiz-animation-plugin/compiz-animation-plugin.fix_976469_abi_safe into lp:compiz-animation-plugin

Proposed by Sam Spilsbury on 2012-04-15
Status: Rejected
Rejected by: Sam Spilsbury on 2012-04-16
Proposed branch: lp:~smspillaz/compiz-animation-plugin/compiz-animation-plugin.fix_976469_abi_safe
Merge into: lp:compiz-animation-plugin
Diff against target: 199 lines (+14/-15)
9 files modified
include/animation/animeffect.h (+4/-2)
include/animation/fade.h (+0/-1)
include/animation/grid.h (+0/-2)
include/animation/gridtransform.h (+0/-1)
include/animation/transform.h (+0/-1)
src/animation.cpp (+7/-1)
src/fade.cpp (+1/-0)
src/private.h (+0/-7)
src/zoomside.cpp (+2/-0)
To merge this branch: bzr merge lp:~smspillaz/compiz-animation-plugin/compiz-animation-plugin.fix_976469_abi_safe
Reviewer Review Type Date Requested Status
Sam Spilsbury Disapprove on 2012-04-16
Daniel van Vugt 2012-04-15 Needs Fixing on 2012-04-16
Review via email: mp+102023@code.launchpad.net

Description of the change

Turns out that compiz-plugins-extra uses the Animation class, so we can't add virtual functions to it. Backs out the change that added virtual functions and uses a dptr method instead to determine whether or not we need to set the transformed window mask.

To post a comment you must log in.
Daniel van Vugt (vanvugt) wrote :

smspillaz just said this fix is no longer required. They're going to just rebuild compiz-plugins-extra.

Daniel van Vugt (vanvugt) wrote :

Also, this branch appears to cause a weird regression: When minimizing/restoring nautilus or thunderbird windows I get strange flickering. And during the animation/flickering the original rectangular window itself flickers too.

That's with the default animation settings (magic lamp?)

review: Needs Fixing
Sam Spilsbury (smspillaz) wrote :

No longer required

review: Disapprove

Unmerged revisions

398. By Sam Spilsbury on 2012-04-15

Fix 976469 without breaking the ABI

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/animation/animeffect.h'
2--- include/animation/animeffect.h 2012-04-10 06:13:37 +0000
3+++ include/animation/animeffect.h 2012-04-15 02:34:19 +0000
4@@ -1,5 +1,6 @@
5 #ifndef ANIMATION_ANIMEFFECT_H
6 #define ANIMATION_ANIMEFFECT_H
7+#include <map>
8 #include "animation.h"
9
10 typedef Animation *(*CreateAnimFunc) (CompWindow *w,
11@@ -94,7 +95,10 @@
12 inline CompString optValS (unsigned int optionId) { return optVal (optionId).s (); }
13 inline unsigned short *optValC (unsigned int optionId) { return optVal (optionId).c (); }
14
15+
16 public:
17+
18+ static std::map <Animation *, bool> dRequiredTransformedWindowForAnim;
19
20 Animation (CompWindow *w,
21 WindowEvent curWindowEvent,
22@@ -172,8 +176,6 @@
23 return gWindow->glPaint (attrib, transform, region, mask);
24 }
25
26- virtual bool requiresTransformedWindow () const { return true; }
27-
28 /// Gets info about the (extension) plugin that implements this animation.
29 /// Should be overriden by a base animation class in every extension plugin.
30 virtual ExtensionPluginInfo *getExtensionPluginInfo ();
31
32=== modified file 'include/animation/fade.h'
33--- include/animation/fade.h 2012-04-10 06:13:37 +0000
34+++ include/animation/fade.h 2012-04-15 02:34:19 +0000
35@@ -14,7 +14,6 @@
36 void updateBB (CompOutput &output);
37 bool updateBBUsed () { return true; }
38 void updateAttrib (GLWindowPaintAttrib &wAttrib);
39- virtual bool requiresTransformedWindow () const { return false; }
40 virtual float getFadeProgress () { return progressLinear (); }
41 };
42 #endif
43
44=== modified file 'include/animation/grid.h'
45--- include/animation/grid.h 2012-04-10 06:13:37 +0000
46+++ include/animation/grid.h 2012-04-15 02:34:19 +0000
47@@ -82,8 +82,6 @@
48
49 virtual bool using3D () { return false; }
50
51- virtual bool requiresTransformedWindow () const { return true; }
52-
53 virtual void initGrid (); ///< Initializes grid width/height.
54 ///< Default grid size is 2x2.
55 ///< Override for custom grid size.
56
57=== modified file 'include/animation/gridtransform.h'
58--- include/animation/gridtransform.h 2012-04-10 06:13:37 +0000
59+++ include/animation/gridtransform.h 2012-04-15 02:34:19 +0000
60@@ -15,7 +15,6 @@
61 void updateTransform (GLMatrix &wTransform);
62 void updateBB (CompOutput &output);
63 bool updateBBUsed () { return true; }
64- bool requiresTransformedWindow () const { return true; }
65
66 protected:
67 bool mUsingTransform; ///< whether transform matrix is used (default: true)
68
69=== modified file 'include/animation/transform.h'
70--- include/animation/transform.h 2012-04-10 06:13:37 +0000
71+++ include/animation/transform.h 2012-04-15 02:34:19 +0000
72@@ -29,7 +29,6 @@
73 virtual void adjustDuration () {}
74 virtual void applyTransform () {}
75 virtual Point getCenter ();
76- virtual bool requiresTransformedWindow () const { return true; }
77
78 };
79 #endif
80
81=== modified file 'src/animation.cpp'
82--- src/animation.cpp 2012-04-10 07:50:26 +0000
83+++ src/animation.cpp 2012-04-15 02:34:19 +0000
84@@ -86,6 +86,8 @@
85 #include <assert.h>
86 #include "private.h"
87
88+std::map <Animation *, bool> Animation::dRequiredTransformedWindowForAnim;
89+
90 using namespace compiz::core;
91
92 class AnimPluginVTable :
93@@ -455,10 +457,14 @@
94 PrivateAnimScreen *as = mAWindow->priv->paScreen ();
95
96 mTimestep = as->optionGetTimeStep ();
97+
98+ dRequiredTransformedWindowForAnim[this] = false;
99 }
100
101 Animation::~Animation ()
102 {
103+ dRequiredTransformedWindowForAnim.erase (this);
104+
105 delete texturesCache;
106 }
107
108@@ -1592,7 +1598,7 @@
109
110 //w->indexCount = 0; // TODO check if this is still necessary
111
112- if (mCurAnimation->requiresTransformedWindow ())
113+ if (Animation::dRequiredTransformedWindowForAnim [mCurAnimation])
114 mask |= PAINT_WINDOW_TRANSFORMED_MASK;
115
116 wAttrib.xScale = 1.0f;
117
118=== modified file 'src/fade.cpp'
119--- src/fade.cpp 2009-07-15 16:05:10 +0000
120+++ src/fade.cpp 2012-04-15 02:34:19 +0000
121@@ -45,6 +45,7 @@
122 const CompRect &icon) :
123 Animation::Animation (w, curWindowEvent, duration, info, icon)
124 {
125+ Animation::dRequiredTransformedWindowForAnim[this] = false;
126 }
127
128 void
129
130=== modified file 'src/private.h'
131--- src/private.h 2012-04-10 06:13:37 +0000
132+++ src/private.h 2012-04-15 02:34:19 +0000
133@@ -502,7 +502,6 @@
134 inline bool hasExtraTransform () { return true; }
135 void applyExtraTransform (float progress);
136 inline bool shouldAvoidParallelogramLook () { return true; }
137- bool requiresTransformedWindow () const { return true; }
138 };
139
140 class WaveAnim :
141@@ -519,7 +518,6 @@
142 void initGrid ();
143 inline bool using3D () { return true; }
144 void step ();
145- bool requiresTransformedWindow () const { return true; }
146
147 static const float kMinDuration;
148 };
149@@ -542,7 +540,6 @@
150 bool zoomToIcon ();
151 void applyTransform ();
152 float getFadeProgress ();
153- bool requiresTransformedWindow () const { return true; }
154
155 float getProgress ();
156 virtual void getParams (float *finalDistFac,
157@@ -762,7 +759,6 @@
158 void adjustDuration ();
159 float getFadeProgress ();
160 bool zoomToIcon ();
161- bool requiresTransformedWindow () const { return true; }
162
163 static const float kDurationFactor;
164 };
165@@ -780,7 +776,6 @@
166 inline bool using3D () { return true; }
167 float getFadeProgress ();
168 void updateWindowAttrib (GLWindowPaintAttrib &attrib);
169- bool requiresTransformedWindow () const { return true; }
170 };
171
172 class CurvedFoldAnim :
173@@ -802,7 +797,6 @@
174 float sinForProg,
175 float relDistToCenter,
176 float curveMaxAmp);
177- bool requiresTransformedWindow () const { return true; }
178 };
179
180 class HorizontalFoldsAnim :
181@@ -823,5 +817,4 @@
182 float sinForProg,
183 float relDistToFoldCenter,
184 float foldMaxAmp);
185- bool requiresTransformedWindow () const { return true; }
186 };
187
188=== modified file 'src/zoomside.cpp'
189--- src/zoomside.cpp 2011-03-14 15:35:30 +0000
190+++ src/zoomside.cpp 2012-04-15 02:34:19 +0000
191@@ -60,6 +60,8 @@
192 mIcon.setX (outRect.x () + outRect.width () / 2 - mIcon.width () / 2);
193 mIcon.setY (outRect.y () + outRect.height () / 2 - mIcon.height () / 2);
194 }
195+
196+ Animation::dRequiredTransformedWindowForAnim[this] = true;
197 }
198
199 SidekickAnim::SidekickAnim (CompWindow *w,

Subscribers

People subscribed via source and target branches