Merge lp://qastaging/~mc-return/compiz/compiz.merge-plugin-simple-animations into lp://qastaging/compiz/0.9.10

Proposed by MC Return
Status: Work in progress
Proposed branch: lp://qastaging/~mc-return/compiz/compiz.merge-plugin-simple-animations
Merge into: lp://qastaging/compiz/0.9.10
Diff against target: 1778 lines (+1716/-0)
12 files modified
plugins/simple-animations/CMakeLists.txt (+8/-0)
plugins/simple-animations/animationsim.xml.in (+235/-0)
plugins/simple-animations/src/animationsim.cpp (+160/-0)
plugins/simple-animations/src/animationsim.h (+405/-0)
plugins/simple-animations/src/bounce.cpp (+76/-0)
plugins/simple-animations/src/expand-piecewise.cpp (+90/-0)
plugins/simple-animations/src/expand.cpp (+70/-0)
plugins/simple-animations/src/fan.cpp (+51/-0)
plugins/simple-animations/src/flyin.cpp (+86/-0)
plugins/simple-animations/src/pulse.cpp (+50/-0)
plugins/simple-animations/src/rotatein.cpp (+210/-0)
plugins/simple-animations/src/sheet.cpp (+275/-0)
To merge this branch: bzr merge lp://qastaging/~mc-return/compiz/compiz.merge-plugin-simple-animations
Reviewer Review Type Date Requested Status
MC Return Pending
Daniel van Vugt Pending
Sam Spilsbury Pending
Review via email: mp+156689@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2012-07-16.

Commit message

Added the plug-in "Simple Animations" converted from git to bzr (including full history) to lp:compiz.

Description of the change

Adds the plug-in "Simple Animations" converted from git to bzr (including full history) to lp:compiz

To post a comment you must log in.
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Worked in Compiz 0.9.5+ versions. Currently unfortunately fails to build:

In file included from /home/mcr2010/src/compiz/plugins/simple-animations/src/bounce.cpp:37:0:
/home/mcr2010/src/compiz/plugins/simple-animations/src/animationsim.h:114:7: error: no unique final overrider for ‘virtual bool Animation::requiresTransformedWindow() const’ in ‘FlyInAnim’
/home/mcr2010/src/compiz/plugins/simple-animations/src/animationsim.h:225:7: error: no unique final overrider for ‘virtual bool Animation::requiresTransformedWindow() const’ in ‘BounceAnim’
/home/mcr2010/src/compiz/plugins/simple-animations/src/animationsim.h:311:7: error: no unique final overrider for ‘virtual bool Animation::requiresTransformedWindow() const’ in ‘PulseSingleAnim’
/home/mcr2010/src/compiz/plugins/simple-animations/src/animationsim.h:351:7: error: no unique final overrider for ‘virtual bool Animation::requiresTransformedWindow() const’ in ‘FanSingleAnim’
make[2]: *** [CMakeFiles/animationsim.dir/src/bounce.cpp.o] Error 1
make[1]: *** [CMakeFiles/animationsim.dir/all] Error 2
make: *** [all] Error 2

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

You just need to implement requiresTransformedWindow () in all of those clases.

just something like

bool requiresTransformedWindow () { return true; }

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal
Download full text (4.3 KiB)

Now it compiles :)
Some warnings remain:

compiz.merge-plugin-simple-animations/plugins/simple-animations/src/flyin.cpp: In member function ‘virtual void FlyInAnim::applyTransform()’:
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/flyin.cpp:81:42: warning: ‘offsetY’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/flyin.cpp:80:42: warning: ‘offsetX’ may be used uninitialized in this function [-Wmaybe-uninitialized]

compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp: In member function ‘virtual void RotateInAnim::prePaintWindow()’:
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:112:11: warning: variable ‘originX’ set but not used [-Wunused-but-set-variable]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:112:20: warning: variable ‘originY’ set but not used [-Wunused-but-set-variable]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp: In member function ‘virtual void RotateInAnim::postPaintWindow()’:
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:172:11: warning: variable ‘originX’ set but not used [-Wunused-but-set-variable]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:172:20: warning: variable ‘originY’ set but not used [-Wunused-but-set-variable]
[100%] Building CXX object plugins/simple-animations/CMakeFiles/animationsim.dir/__/__/generated/animationsim_options.cpp.o
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:214:55: warning: ‘angleY’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:213:55: warning: ‘angleX’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp: In member function ‘virtual void RotateInAnim::prePaintWindow()’:
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:154:55: warning: ‘angleY’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:153:55: warning: ‘angleX’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp: In member function ‘virtual void RotateInAnim::applyTransform()’:
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:102:51: warning: ‘originY’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:102:51: warning: ‘originX’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:84:38: warning: ‘angleY’ may be used uninitialized in this function [-Wmaybe-uninitialized]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:83:38: w...

Read more...

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Remaining warnings:

compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp: In member function ‘virtual void RotateInAnim::prePaintWindow()’:
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:112:11: warning: variable ‘originX’ set but not used [-Wunused-but-set-variable]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:112:20: warning: variable ‘originY’ set but not used [-Wunused-but-set-variable]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp: In member function ‘virtual void RotateInAnim::postPaintWindow()’:
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:172:11: warning: variable ‘originX’ set but not used [-Wunused-but-set-variable]
compiz.merge-plugin-simple-animations/plugins/simple-animations/src/rotatein.cpp:172:20: warning: variable ‘originY’ set but not used [-Wunused-but-set-variable]

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

I've also fixed the [-Wmaybe-uninitialized] warnings for 'parent' in member function ‘virtual void SheetAnim::step()’ in r3292 (forgot to add this info to the commit message).

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Tested all of the simple-animations (even with slow animations on).
Everything works smooth and the animations all look really nice. :)

The "Sheet" animation seems to "simplify" the window content - that is the only (minor) animation issue I've found with those.
Also somehow in the "Animation" plug-in the new simple-animations are just available for opening or closing animations, but not for minimizing, but I guess it is designed this way (have not analyzed this behavior yet).

Seems this branch is quite mature now.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Code wise this looks OK, could you tidy up the following things?

15 === added file 'plugins/simple-animations/VERSION'
16 --- plugins/simple-animations/VERSION 1970-01-01 00:00:00 +0000
17 +++ plugins/simple-animations/VERSION 2012-08-06 16:49:52 +0000
18 @@ -0,0 +1,1 @@
19 +0.9.5.0

That can be removed

565 + void step () { TransformAnim::step (); }
566 + bool updateBBUsed () { return true; }
567 + void updateBB (CompOutput &output) { TransformAnim::updateBB (output); }
568 + void applyTransform ();
569 + bool requiresTransformedWindow () const { return true; }
570 +

The indentation here is not correct, it can be 2 indents (1 8 wide tab) for updateBBUsed and requiresTransformedWindow

+ bool requiresTransformedWindow () const { return true; }

Ditto

Revision history for this message
Sam Spilsbury (smspillaz) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> Code wise this looks OK, could you tidy up the following things?

Sure.

> 15 === added file 'plugins/simple-animations/VERSION'
> 16 --- plugins/simple-animations/VERSION 1970-01-01 00:00:00 +0000
> 17 +++ plugins/simple-animations/VERSION 2012-08-06 16:49:52 +0000
> 18 @@ -0,0 +1,1 @@
> 19 +0.9.5.0
>
> That can be removed

Removed in r3294.

> 565 + void step () { TransformAnim::step (); }
> 566 + bool updateBBUsed () { return true; }
> 567 + void updateBB (CompOutput &output) { TransformAnim::updateBB
> (output); }
> 568 + void applyTransform ();
> 569 + bool requiresTransformedWindow () const { return true; }
> 570 +
>
> The indentation here is not correct, it can be 2 indents (1 8 wide tab) for
> updateBBUsed and requiresTransformedWindow
>
> + bool requiresTransformedWindow () const { return true; }
>
> Ditto

Done.

review: Needs Resubmitting
Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

I also ran cppcheck on this plug-in and found a few issues I've now fixed also.

1. Reduced the scope of the float distance

2. Removed redundant condition check of the angle (if the angle is more than 270 it will always be bigger than 90), but please check that again, because it might be a typo and it could also mean that the angle should be between 90 and 270.
The rotatein animation works perfectly though...

3. Not fixed yet: (warning) Member variable 'ExtensionPluginAnimSim::mOutput' is not initialized in the constructor.
Should this be fixed ?

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

/home/dan/bzr/compiz/tmp.simple/plugins/simple-animations/src/animationsim.cpp: In member function ‘void AnimSimScreen::initAnimationList()’:
/home/dan/bzr/compiz/tmp.simple/plugins/simple-animations/src/animationsim.cpp:90:35: error: no matching function for call to ‘AnimEffectInfo::AnimEffectInfo(const char [19], AnimEffectUsedFor&, bool, bool, bool, bool, bool, <unresolved overloaded function type>)’
/home/dan/bzr/compiz/tmp.simple/plugins/simple-animations/src/animationsim.cpp:90:35: note: candidates are:
/home/dan/bzr/compiz/tmp.simple/plugins/simple-animations/../animation/include/animation/animeffect.h:34:6: note: AnimEffectInfo::AnimEffectInfo(const char*, AnimEffectUsedFor, CreateAnimFunc, bool)
/home/dan/bzr/compiz/tmp.simple/plugins/simple-animations/../animation/include/animation/animeffect.h:34:6: note: candidate expects 4 arguments, 8 provided
/home/dan/bzr/compiz/tmp.simple/plugins/simple-animations/../animation/include/animation/animeffect.h:31:7: note: AnimEffectInfo::AnimEffectInfo(const AnimEffectInfo&)
/home/dan/bzr/compiz/tmp.simple/plugins/simple-animations/../animation/include/animation/animeffect.h:31:7: note: candidate expects 1 argument, 8 provided
make[2]: *** [plugins/simple-animations/CMakeFiles/animationsim.dir/src/animationsim.cpp.o] Error 1
make[1]: *** [plugins/simple-animations/CMakeFiles/animationsim.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

review: Needs Fixing

Unmerged revisions

3301. By MC Return

Added support for unminimize animations and simplified the code by also using the new class AnimEffectUsedFor like it was done for animationaddon.cpp already

3300. By MC Return

Removed redundant newlines

3299. By MC Return

Fixed begginning -> beginning typo in tooltip

3298. By MC Return

Fixed redundant condition checks (x4): If xRot/yRot > 270.0f, the comparison xRot/yRot > 90.0f is always true.

3297. By MC Return

Reduced the scope of the variable 'distance'

3296. By MC Return

Hopefully fixed indentation

3295. By MC Return

Merged lp:compiz

3294. By MC Return

Removed plugins/simple-animations/VERSION

3293. By MC Return

Merged lp:compiz

3292. By MC Return

Fixed variables 'originX' and 'originY' set but not used [-Wunused-but-set-variable] compiler warnings in RotateInAnim::prePaintWindow () and RotateInAnim::postPaintWindow () (rotatein.cpp) by removing the 'originX' and 'originY' variables and the unnecessary, unused calculations with those variables

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: