OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkDisplayMovie_DEFINED | 10 #ifndef SkDisplayMovie_DEFINED |
11 #define SkDisplayMovie_DEFINED | 11 #define SkDisplayMovie_DEFINED |
12 | 12 |
13 #include "SkAnimator.h" | 13 #include "SkAnimator.h" |
14 #include "SkADrawable.h" | 14 #include "SkADrawable.h" |
15 #include "SkMemberInfo.h" | 15 #include "SkMemberInfo.h" |
16 | 16 |
17 struct SkEventState; | 17 struct SkEventState; |
18 | 18 |
19 class SkDisplayMovie : public SkADrawable { | 19 class SkDisplayMovie : public SkADrawable { |
20 DECLARE_DISPLAY_MEMBER_INFO(Movie); | 20 DECLARE_DISPLAY_MEMBER_INFO(Movie); |
21 SkDisplayMovie(); | 21 SkDisplayMovie(); |
22 virtual ~SkDisplayMovie(); | 22 virtual ~SkDisplayMovie(); |
23 void buildMovie(); | 23 void buildMovie(); |
24 virtual SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; | 24 SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; |
25 virtual void dirty() SK_OVERRIDE; | 25 void dirty() SK_OVERRIDE; |
26 bool doEvent(const SkEvent& evt) { | 26 bool doEvent(const SkEvent& evt) { |
27 return fLoaded && fMovie.doEvent(evt); | 27 return fLoaded && fMovie.doEvent(evt); |
28 } | 28 } |
29 virtual bool doEvent(SkDisplayEvent::Kind , SkEventState* state ) SK_OVERRID
E; | 29 bool doEvent(SkDisplayEvent::Kind , SkEventState* state ) SK_OVERRIDE; |
30 virtual bool draw(SkAnimateMaker& ) SK_OVERRIDE; | 30 bool draw(SkAnimateMaker& ) SK_OVERRIDE; |
31 #ifdef SK_DUMP_ENABLED | 31 #ifdef SK_DUMP_ENABLED |
32 virtual void dump(SkAnimateMaker* ) SK_OVERRIDE; | 32 void dump(SkAnimateMaker* ) SK_OVERRIDE; |
33 virtual void dumpEvents() SK_OVERRIDE; | 33 void dumpEvents() SK_OVERRIDE; |
34 #endif | 34 #endif |
35 virtual bool enable(SkAnimateMaker& ) SK_OVERRIDE; | 35 bool enable(SkAnimateMaker& ) SK_OVERRIDE; |
36 const SkAnimator* getAnimator() const { return &fMovie; } | 36 const SkAnimator* getAnimator() const { return &fMovie; } |
37 virtual bool hasEnable() const SK_OVERRIDE; | 37 bool hasEnable() const SK_OVERRIDE; |
38 virtual void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; | 38 void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; |
39 protected: | 39 protected: |
40 SkString src; | 40 SkString src; |
41 SkAnimator fMovie; | 41 SkAnimator fMovie; |
42 SkBool8 fDecodedSuccessfully; | 42 SkBool8 fDecodedSuccessfully; |
43 SkBool8 fLoaded; | 43 SkBool8 fLoaded; |
44 SkBool8 fMovieBuilt; | 44 SkBool8 fMovieBuilt; |
45 friend class SkAnimateMaker; | 45 friend class SkAnimateMaker; |
46 friend class SkPost; | 46 friend class SkPost; |
47 private: | 47 private: |
48 typedef SkADrawable INHERITED; | 48 typedef SkADrawable INHERITED; |
49 }; | 49 }; |
50 | 50 |
51 #endif // SkDisplayMovie_DEFINED | 51 #endif // SkDisplayMovie_DEFINED |
OLD | NEW |