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
=== modified file 'include/animation/animeffect.h'
--- include/animation/animeffect.h 2012-04-10 06:13:37 +0000
+++ include/animation/animeffect.h 2012-04-15 02:34:19 +0000
@@ -1,5 +1,6 @@
1#ifndef ANIMATION_ANIMEFFECT_H1#ifndef ANIMATION_ANIMEFFECT_H
2#define ANIMATION_ANIMEFFECT_H2#define ANIMATION_ANIMEFFECT_H
3#include <map>
3#include "animation.h"4#include "animation.h"
45
5typedef Animation *(*CreateAnimFunc) (CompWindow *w,6typedef Animation *(*CreateAnimFunc) (CompWindow *w,
@@ -94,7 +95,10 @@
94 inline CompString optValS (unsigned int optionId) { return optVal (optionId).s (); }95 inline CompString optValS (unsigned int optionId) { return optVal (optionId).s (); }
95 inline unsigned short *optValC (unsigned int optionId) { return optVal (optionId).c (); }96 inline unsigned short *optValC (unsigned int optionId) { return optVal (optionId).c (); }
96 97
98
97public:99public:
100
101 static std::map <Animation *, bool> dRequiredTransformedWindowForAnim;
98 102
99 Animation (CompWindow *w,103 Animation (CompWindow *w,
100 WindowEvent curWindowEvent,104 WindowEvent curWindowEvent,
@@ -172,8 +176,6 @@
172 return gWindow->glPaint (attrib, transform, region, mask);176 return gWindow->glPaint (attrib, transform, region, mask);
173 }177 }
174178
175 virtual bool requiresTransformedWindow () const { return true; }
176
177 /// Gets info about the (extension) plugin that implements this animation.179 /// Gets info about the (extension) plugin that implements this animation.
178 /// Should be overriden by a base animation class in every extension plugin.180 /// Should be overriden by a base animation class in every extension plugin.
179 virtual ExtensionPluginInfo *getExtensionPluginInfo ();181 virtual ExtensionPluginInfo *getExtensionPluginInfo ();
180182
=== modified file 'include/animation/fade.h'
--- include/animation/fade.h 2012-04-10 06:13:37 +0000
+++ include/animation/fade.h 2012-04-15 02:34:19 +0000
@@ -14,7 +14,6 @@
14 void updateBB (CompOutput &output);14 void updateBB (CompOutput &output);
15 bool updateBBUsed () { return true; }15 bool updateBBUsed () { return true; }
16 void updateAttrib (GLWindowPaintAttrib &wAttrib);16 void updateAttrib (GLWindowPaintAttrib &wAttrib);
17 virtual bool requiresTransformedWindow () const { return false; }
18 virtual float getFadeProgress () { return progressLinear (); }17 virtual float getFadeProgress () { return progressLinear (); }
19};18};
20#endif19#endif
2120
=== modified file 'include/animation/grid.h'
--- include/animation/grid.h 2012-04-10 06:13:37 +0000
+++ include/animation/grid.h 2012-04-15 02:34:19 +0000
@@ -82,8 +82,6 @@
8282
83 virtual bool using3D () { return false; }83 virtual bool using3D () { return false; }
8484
85 virtual bool requiresTransformedWindow () const { return true; }
86
87 virtual void initGrid (); ///< Initializes grid width/height.85 virtual void initGrid (); ///< Initializes grid width/height.
88 ///< Default grid size is 2x2.86 ///< Default grid size is 2x2.
89 ///< Override for custom grid size.87 ///< Override for custom grid size.
9088
=== modified file 'include/animation/gridtransform.h'
--- include/animation/gridtransform.h 2012-04-10 06:13:37 +0000
+++ include/animation/gridtransform.h 2012-04-15 02:34:19 +0000
@@ -15,7 +15,6 @@
15 void updateTransform (GLMatrix &wTransform);15 void updateTransform (GLMatrix &wTransform);
16 void updateBB (CompOutput &output);16 void updateBB (CompOutput &output);
17 bool updateBBUsed () { return true; }17 bool updateBBUsed () { return true; }
18 bool requiresTransformedWindow () const { return true; }
19 18
20protected:19protected:
21 bool mUsingTransform; ///< whether transform matrix is used (default: true)20 bool mUsingTransform; ///< whether transform matrix is used (default: true)
2221
=== modified file 'include/animation/transform.h'
--- include/animation/transform.h 2012-04-10 06:13:37 +0000
+++ include/animation/transform.h 2012-04-15 02:34:19 +0000
@@ -29,7 +29,6 @@
29 virtual void adjustDuration () {}29 virtual void adjustDuration () {}
30 virtual void applyTransform () {}30 virtual void applyTransform () {}
31 virtual Point getCenter ();31 virtual Point getCenter ();
32 virtual bool requiresTransformedWindow () const { return true; }
33 32
34};33};
35#endif34#endif
3635
=== modified file 'src/animation.cpp'
--- src/animation.cpp 2012-04-10 07:50:26 +0000
+++ src/animation.cpp 2012-04-15 02:34:19 +0000
@@ -86,6 +86,8 @@
86#include <assert.h>86#include <assert.h>
87#include "private.h"87#include "private.h"
8888
89std::map <Animation *, bool> Animation::dRequiredTransformedWindowForAnim;
90
89using namespace compiz::core;91using namespace compiz::core;
9092
91class AnimPluginVTable :93class AnimPluginVTable :
@@ -455,10 +457,14 @@
455 PrivateAnimScreen *as = mAWindow->priv->paScreen ();457 PrivateAnimScreen *as = mAWindow->priv->paScreen ();
456458
457 mTimestep = as->optionGetTimeStep ();459 mTimestep = as->optionGetTimeStep ();
460
461 dRequiredTransformedWindowForAnim[this] = false;
458}462}
459463
460Animation::~Animation ()464Animation::~Animation ()
461{465{
466 dRequiredTransformedWindowForAnim.erase (this);
467
462 delete texturesCache;468 delete texturesCache;
463}469}
464470
@@ -1592,7 +1598,7 @@
15921598
1593 //w->indexCount = 0; // TODO check if this is still necessary1599 //w->indexCount = 0; // TODO check if this is still necessary
15941600
1595 if (mCurAnimation->requiresTransformedWindow ())1601 if (Animation::dRequiredTransformedWindowForAnim [mCurAnimation])
1596 mask |= PAINT_WINDOW_TRANSFORMED_MASK;1602 mask |= PAINT_WINDOW_TRANSFORMED_MASK;
15971603
1598 wAttrib.xScale = 1.0f;1604 wAttrib.xScale = 1.0f;
15991605
=== modified file 'src/fade.cpp'
--- src/fade.cpp 2009-07-15 16:05:10 +0000
+++ src/fade.cpp 2012-04-15 02:34:19 +0000
@@ -45,6 +45,7 @@
45 const CompRect &icon) :45 const CompRect &icon) :
46 Animation::Animation (w, curWindowEvent, duration, info, icon)46 Animation::Animation (w, curWindowEvent, duration, info, icon)
47{47{
48 Animation::dRequiredTransformedWindowForAnim[this] = false;
48}49}
4950
50void51void
5152
=== modified file 'src/private.h'
--- src/private.h 2012-04-10 06:13:37 +0000
+++ src/private.h 2012-04-15 02:34:19 +0000
@@ -502,7 +502,6 @@
502 inline bool hasExtraTransform () { return true; }502 inline bool hasExtraTransform () { return true; }
503 void applyExtraTransform (float progress);503 void applyExtraTransform (float progress);
504 inline bool shouldAvoidParallelogramLook () { return true; }504 inline bool shouldAvoidParallelogramLook () { return true; }
505 bool requiresTransformedWindow () const { return true; }
506};505};
507506
508class WaveAnim :507class WaveAnim :
@@ -519,7 +518,6 @@
519 void initGrid ();518 void initGrid ();
520 inline bool using3D () { return true; }519 inline bool using3D () { return true; }
521 void step ();520 void step ();
522 bool requiresTransformedWindow () const { return true; }
523521
524 static const float kMinDuration;522 static const float kMinDuration;
525};523};
@@ -542,7 +540,6 @@
542 bool zoomToIcon ();540 bool zoomToIcon ();
543 void applyTransform ();541 void applyTransform ();
544 float getFadeProgress ();542 float getFadeProgress ();
545 bool requiresTransformedWindow () const { return true; }
546543
547 float getProgress ();544 float getProgress ();
548 virtual void getParams (float *finalDistFac,545 virtual void getParams (float *finalDistFac,
@@ -762,7 +759,6 @@
762 void adjustDuration ();759 void adjustDuration ();
763 float getFadeProgress ();760 float getFadeProgress ();
764 bool zoomToIcon ();761 bool zoomToIcon ();
765 bool requiresTransformedWindow () const { return true; }
766762
767 static const float kDurationFactor;763 static const float kDurationFactor;
768};764};
@@ -780,7 +776,6 @@
780 inline bool using3D () { return true; }776 inline bool using3D () { return true; }
781 float getFadeProgress ();777 float getFadeProgress ();
782 void updateWindowAttrib (GLWindowPaintAttrib &attrib);778 void updateWindowAttrib (GLWindowPaintAttrib &attrib);
783 bool requiresTransformedWindow () const { return true; }
784};779};
785780
786class CurvedFoldAnim :781class CurvedFoldAnim :
@@ -802,7 +797,6 @@
802 float sinForProg,797 float sinForProg,
803 float relDistToCenter,798 float relDistToCenter,
804 float curveMaxAmp);799 float curveMaxAmp);
805 bool requiresTransformedWindow () const { return true; }
806};800};
807801
808class HorizontalFoldsAnim :802class HorizontalFoldsAnim :
@@ -823,5 +817,4 @@
823 float sinForProg,817 float sinForProg,
824 float relDistToFoldCenter,818 float relDistToFoldCenter,
825 float foldMaxAmp);819 float foldMaxAmp);
826 bool requiresTransformedWindow () const { return true; }
827};820};
828821
=== modified file 'src/zoomside.cpp'
--- src/zoomside.cpp 2011-03-14 15:35:30 +0000
+++ src/zoomside.cpp 2012-04-15 02:34:19 +0000
@@ -60,6 +60,8 @@
60 mIcon.setX (outRect.x () + outRect.width () / 2 - mIcon.width () / 2);60 mIcon.setX (outRect.x () + outRect.width () / 2 - mIcon.width () / 2);
61 mIcon.setY (outRect.y () + outRect.height () / 2 - mIcon.height () / 2);61 mIcon.setY (outRect.y () + outRect.height () / 2 - mIcon.height () / 2);
62 }62 }
63
64 Animation::dRequiredTransformedWindowForAnim[this] = true;
63}65}
6466
65SidekickAnim::SidekickAnim (CompWindow *w,67SidekickAnim::SidekickAnim (CompWindow *w,

Subscribers

People subscribed via source and target branches