1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*
* Copyright 2006 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkDisplayList_DEFINED
#define SkDisplayList_DEFINED
#include "SkOperand.h"
#include "SkIntArray.h"
#include "SkRect.h"
#include "SkRefCnt.h"
class SkAnimateMaker;
class SkActive;
class SkApply;
class SkADrawable;
class SkGroup;
class SkDisplayList : public SkRefCnt {
public:
SkDisplayList();
virtual ~SkDisplayList();
void append(SkActive* );
void clear() { fDrawList.reset(); }
int count() { return fDrawList.count(); }
bool draw(SkAnimateMaker& , SkMSec time);
#ifdef SK_DUMP_ENABLED
void dump(SkAnimateMaker* maker);
void dumpInner(SkAnimateMaker* maker);
static int fIndent;
static int fDumpIndex;
#endif
int findGroup(SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList);
SkADrawable* get(int index) { return fDrawList[index]; }
SkMSec getTime() { return fInTime; }
SkTDDrawableArray* getDrawList() { return &fDrawList; }
void hardReset();
virtual bool onIRect(const SkIRect& r);
void reset();
void remove(SkActive* );
#ifdef SK_DEBUG
void validate();
#else
void validate() {}
#endif
static int SearchForMatch(SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray**grandList);
static bool SearchGroupForMatch(SkADrawable* draw, SkADrawable* match,
SkTDDrawableArray** list, SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList,
int &index);
public:
SkIRect fBounds;
SkIRect fInvalBounds;
bool fDrawBounds;
bool fHasUnion;
bool fUnionBounds;
private:
SkTDDrawableArray fDrawList;
SkTDActiveArray fActiveList;
SkMSec fInTime;
friend class SkEvents;
};
#endif // SkDisplayList_DEFINED
|