1 #ifndef ANIMATION_ZOOM_H
 2 #define ANIMATION_ZOOM_H
 3 #include "animation.h"
 4 
CID 12600 - USE_AFTER_FREE
"FadeAnim::~FadeAnim()" frees "this->texturesCache".
Calling "TransformAnim::~TransformAnim()" frees pointer "this->texturesCache" which has already been freed.
 5 class ZoomAnim :
 6     public FadeAnim,
 7     virtual public TransformAnim
 8 {
 9 public:
10      ZoomAnim (CompWindow *w,
11 	       WindowEvent curWindowEvent,
12 	       float duration,
13 	       const AnimEffect info,
14 	       const CompRect &icon);
15 
16 public:
17      void step () { TransformAnim::step (); }
18      void adjustDuration ();
19      float getFadeProgress ();
20      bool updateBBUsed () { return true; }
21      void updateBB (CompOutput &output) { TransformAnim::updateBB (output); }
22      void applyTransform ();
23 protected:
24      float getActualProgress ();
25      Point getCenter ();
26      virtual float getSpringiness ();
27      virtual bool isZoomFromCenter ();
28      virtual bool zoomToIcon () { return true; }
29      virtual bool hasExtraTransform () { return false; }
30      virtual void applyExtraTransform (float progress) {}
31      virtual bool shouldAvoidParallelogramLook () { return false; }
32      virtual bool scaleAroundIcon ();
33      virtual bool neverSpringy () { return false; }
34      void getZoomProgress (float *moveProgress,
35 			   float *scaleProgress,
36 			   bool neverSpringy);
37      bool requiresTransformedWindow () const { return true; }
38 
39      static const float kDurationFactor;
40      static const float kSpringyDurationFactor;
41      static const float kNonspringyDurationFactor;
42 
43 private:
44      void getCenterScaleFull (Point *pCurCenter, Point *pCurScale,
45 			      Point *pWinCenter, Point *pIconCenter,
46 			      float *pMoveProgress);
47      void getCenterScale (Point *pCurCenter, Point *pCurScale);
48 };
49 
50 class GridZoomAnim :
51     public GridTransformAnim,
52     public ZoomAnim
53 {
54 public:
55     GridZoomAnim (CompWindow *w,
56 		  WindowEvent curWindowEvent,
57 		  float duration,
58 		  const AnimEffect info,
59 		  const CompRect &icon);
60     void init () { GridTransformAnim::init (); }
61     void step () { ZoomAnim::step (); }
62     void updateTransform (GLMatrix &wTransform)
63     { GridTransformAnim::updateTransform (wTransform); }
64     void updateBB (CompOutput &output) { GridTransformAnim::updateBB (output); }
65     bool updateBBUsed () { return true; }
66     bool neverSpringy () { return true; }
67     float getSpringiness () { return 0; }
68     bool scaleAroundIcon () { return false; }
69     void adjustDuration ();
70     bool requiresTransformedWindow () const { return true; }
71 };
72 #endif