~3v1n0/compiz/resize-lowgfx-fixes

« back to all changes in this revision

Viewing changes to plugins/animation/include/animation/multi.h

  • Committer: BryanFRitt
  • Date: 2016-07-14 15:43:48 UTC
  • mfrom: (4067 compiz)
  • mto: This revision was merged to the branch mainline in revision 4075.
  • Revision ID: bryanfritt@hotmail.com-20160714154348-sit21cmf3dzpfkpn
ran `bzr merge lp:compiz`

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef ANIMATION_MULTI_H
2
2
#define ANIMATION_MULTI_H
3
3
#include "animation.h"
 
4
#include <opengl/opengl.h>
 
5
#include <composite/composite.h>
4
6
/// Special class, allows multiple copies of an animation to happen
5
7
/// at any one time. Create your "single copy" animation class first
6
8
/// and then create a new animation which derives from this template
140
142
            foreach (SingleAnim *a, animList)
141
143
            {
142
144
                setCurrAnimNumber (mAWindow, count);
143
 
                GLWindowPaintAttrib attr (attrib);
144
 
                a->updateAttrib (attr);
145
 
                mGlPaintAttribs.at (count) = attr;
 
145
                mGlPaintAttribs[count] = attrib;
 
146
                a->updateAttrib (mGlPaintAttribs[count]);
146
147
                ++count;
147
148
            }
148
149
        }
172
173
            }
173
174
        }
174
175
 
175
 
        void postPaintWindow ()
 
176
        void postPaintWindow (const GLMatrix &transform)
176
177
        {
177
178
            int count = 0;
178
179
            foreach (SingleAnim *a, animList)
179
180
            {
180
181
                setCurrAnimNumber (mAWindow, count);
181
182
                ++count;
182
 
                a->postPaintWindow ();
 
183
                a->postPaintWindow (transform);
183
184
            }
184
185
        }
185
186
 
377
378
                ++count;
378
379
 
379
380
                if (animList.at (currentAnim)->paintWindowUsed ())
380
 
                    status |= animList.at (currentAnim)->paintWindow
381
 
                            (gWindow, wAttrib, wTransform, region, mask);
 
381
                    status |= animList.at (currentAnim)->paintWindow (gWindow,
 
382
                                                                      wAttrib,
 
383
                                                                      wTransform,
 
384
                                                                      region,
 
385
                                                                      mask);
382
386
                else
383
 
                    status |= gWindow->glPaint
384
 
                            (wAttrib, wTransform, region, mask);
 
387
                {
 
388
                    unsigned int index = gWindow->glPaintGetCurrentIndex ();
 
389
                    status |= gWindow->glPaint (wAttrib,
 
390
                                                wTransform,
 
391
                                                region,
 
392
                                                mask);
 
393
                    gWindow->glPaintSetCurrentIndex (index);
 
394
                }
385
395
            }
386
396
 
387
397
            return status;