OLD | NEW |
| (Empty) |
1 /* libs/graphics/animator/SkDisplayAdd.h | |
2 ** | |
3 ** Copyright 2006, The Android Open Source Project | |
4 ** | |
5 ** Licensed under the Apache License, Version 2.0 (the "License"); | |
6 ** you may not use this file except in compliance with the License. | |
7 ** You may obtain a copy of the License at | |
8 ** | |
9 ** http://www.apache.org/licenses/LICENSE-2.0 | |
10 ** | |
11 ** Unless required by applicable law or agreed to in writing, software | |
12 ** distributed under the License is distributed on an "AS IS" BASIS, | |
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 ** See the License for the specific language governing permissions and | |
15 ** limitations under the License. | |
16 */ | |
17 | |
18 #ifndef SkDisplayAdd_DEFINED | |
19 #define SkDisplayAdd_DEFINED | |
20 | |
21 #include "SkDrawable.h" | |
22 #include "SkMemberInfo.h" | |
23 | |
24 class SkAdd : public SkDrawable { | |
25 DECLARE_MEMBER_INFO(Add); | |
26 SkAdd(); | |
27 | |
28 enum Mode { | |
29 kMode_indirect, | |
30 kMode_immediate | |
31 }; | |
32 | |
33 virtual SkDisplayable* deepCopy(SkAnimateMaker* ); | |
34 virtual bool draw(SkAnimateMaker& ); | |
35 #ifdef SK_DUMP_ENABLED | |
36 virtual void dump(SkAnimateMaker* ); | |
37 #endif | |
38 virtual bool enable(SkAnimateMaker& ); | |
39 virtual bool hasEnable() const; | |
40 virtual void initialize(); | |
41 virtual bool isDrawable() const; | |
42 protected: | |
43 // struct _A { | |
44 Mode mode; | |
45 int32_t offset; | |
46 SkDrawable* use; | |
47 SkDrawable* where; // if NULL, offset becomes index | |
48 // } A; | |
49 private: | |
50 typedef SkDrawable INHERITED; | |
51 }; | |
52 | |
53 class SkClear : public SkDisplayable { | |
54 virtual bool enable(SkAnimateMaker& ); | |
55 }; | |
56 | |
57 class SkMove : public SkAdd { | |
58 DECLARE_MEMBER_INFO(Move); | |
59 private: | |
60 typedef SkAdd INHERITED; | |
61 }; | |
62 | |
63 class SkRemove : public SkAdd { | |
64 DECLARE_MEMBER_INFO(Remove); | |
65 SkRemove(); | |
66 protected: | |
67 SkBool fDelete; | |
68 private: | |
69 friend class SkAdd; | |
70 typedef SkAdd INHERITED; | |
71 }; | |
72 | |
73 class SkReplace : public SkAdd { | |
74 DECLARE_MEMBER_INFO(Replace); | |
75 private: | |
76 typedef SkAdd INHERITED; | |
77 }; | |
78 | |
79 #endif // SkDisplayAdd_DEFINED | |
80 | |
81 | |
OLD | NEW |