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 #include "SkAnimateMaker.h" | 10 #include "SkAnimateMaker.h" |
11 #include "SkAnimator.h" | 11 #include "SkAnimator.h" |
12 #include "SkAnimatorScript.h" | 12 #include "SkAnimatorScript.h" |
13 #include "SkDisplayable.h" | 13 #include "SkDisplayable.h" |
14 #include "SkDisplayApply.h" | 14 #include "SkDisplayApply.h" |
15 #include "SkDisplayList.h" | 15 #include "SkDisplayList.h" |
16 #include "SkDisplayMovie.h" | 16 #include "SkDisplayMovie.h" |
17 #include "SkDisplayType.h" | 17 #include "SkDisplayType.h" |
18 #include "SkExtras.h" | 18 #include "SkExtras.h" |
19 #include "SkMemberInfo.h" | 19 #include "SkMemberInfo.h" |
20 #include "SkStream.h" | 20 #include "SkStream.h" |
21 #include "SkSystemEventTypes.h" | 21 #include "SkSystemEventTypes.h" |
22 #include "SkTime.h" | 22 #include "SkTime.h" |
23 | 23 |
24 class DefaultTimeline : public SkAnimator::Timeline { | 24 class DefaultTimeline : public SkAnimator::Timeline { |
25 virtual SkMSec getMSecs() const { | 25 virtual SkMSec getMSecs() const { |
26 return SkTime::GetMSecs(); | 26 return SkEvent::GetMSecsSinceStartup(); |
27 } | 27 } |
28 } gDefaultTimeline; | 28 } gDefaultTimeline; |
29 | 29 |
30 SkAnimateMaker::SkAnimateMaker(SkAnimator* animator, SkCanvas* canvas, SkPaint*
paint) | 30 SkAnimateMaker::SkAnimateMaker(SkAnimator* animator, SkCanvas* canvas, SkPaint*
paint) |
31 : fActiveEvent(nullptr), fAdjustedStart(0), fCanvas(canvas), fEnableTime(0), | 31 : fActiveEvent(nullptr), fAdjustedStart(0), fCanvas(canvas), fEnableTime(0), |
32 fHostEventSinkID(0), fMinimumInterval((SkMSec) -1), fPaint(paint), fPare
ntMaker(nullptr), | 32 fHostEventSinkID(0), fMinimumInterval((SkMSec) -1), fPaint(paint), fPare
ntMaker(nullptr), |
33 fTimeline(&gDefaultTimeline), fInInclude(false), fInMovie(false), | 33 fTimeline(&gDefaultTimeline), fInInclude(false), fInMovie(false), |
34 fFirstScriptError(false), fLoaded(false), fIDs(256), fAnimator(animator) | 34 fFirstScriptError(false), fLoaded(false), fIDs(256), fAnimator(animator) |
35 { | 35 { |
36 fScreenplay.time = 0; | 36 fScreenplay.time = 0; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 | 364 |
365 bool SkAnimateMaker::GetStep(const char* token, size_t len, void* stepPtr, SkScr
iptValue* value) { | 365 bool SkAnimateMaker::GetStep(const char* token, size_t len, void* stepPtr, SkScr
iptValue* value) { |
366 if (SK_LITERAL_STR_EQUAL("step", token, len)) { | 366 if (SK_LITERAL_STR_EQUAL("step", token, len)) { |
367 value->fOperand.fS32 = *(int32_t*) stepPtr; | 367 value->fOperand.fS32 = *(int32_t*) stepPtr; |
368 value->fType = SkType_Int; | 368 value->fType = SkType_Int; |
369 return true; | 369 return true; |
370 } | 370 } |
371 return false; | 371 return false; |
372 } | 372 } |
OLD | NEW |