Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: src/animator/SkAnimateMaker.cpp

Issue 1811613004: Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Rebase. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « samplecode/SampleClipDrawMatch.cpp ('k') | src/pdf/SkPDFMetadata.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « samplecode/SampleClipDrawMatch.cpp ('k') | src/pdf/SkPDFMetadata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698