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

Issue 1811613004: Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow. (Closed)

Created:
4 years, 9 months ago by dogben
Modified:
4 years, 9 months ago
Reviewers:
mtklein, reed1
CC:
jcgregorio, reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow. The following are currently unused in Android, Google3, Chromium, and Mozilla: - SkEvent - SkTime::GetMSecs - SK_TIME_FACTOR (also unused in Skia) - SkAutoTime I left uses of SkMSec more-or-less intact for SkEvent, SkAnimator, and SkInterpolator. SkInterpolator is used in Chromium, so I did not want to change the API. The views/ and animator/ code is crufty, so it didn't seem worthwhile to refactor it. Instead, I added SkEvent::GetMSecsSinceStartup, which is likely to be adequate for use in SampleApp. I also left SkMSec where it is used to measure a duration rather than a timestamp. With the exception of SkMovie, which is used in Android, all of the uses appear to measure the execution time of a piece of code, which I would hope does not exceed 2^31 milliseconds. Added skiatest::Timer to support a common idiom in tests where we want to measure the wallclock time in integer milliseconds. (Not used in tests/PathOpsSkpClipTest.cpp because it redefines things in Test.h.) Removed tabs in tests/StrokerTest.cpp. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811613004 Committed: https://skia.googlesource.com/skia/+/ec4d4d784dbb250e572f8e04d18d0fd2ebeee851

Patch Set 1 : #

Patch Set 2 : Rebase. #

Total comments: 2

Patch Set 3 : Fix bad merge. #

Patch Set 4 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -137 lines) Patch
M dm/DM.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M gm/SkAnimTimer.h View 4 chunks +17 lines, -14 lines 0 comments Download
M include/animator/SkAnimator.h View 1 chunk +2 lines, -1 line 0 comments Download
M include/core/SkTime.h View 1 chunk +9 lines, -16 lines 0 comments Download
M include/core/SkTypes.h View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M include/views/SkEvent.h View 1 chunk +8 lines, -1 line 0 comments Download
M include/views/SkTouchGesture.h View 1 chunk +2 lines, -2 lines 0 comments Download
M samplecode/SampleClipDrawMatch.cpp View 3 chunks +11 lines, -6 lines 0 comments Download
M src/animator/SkAnimateMaker.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/pdf/SkPDFMetadata.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/views/SkEvent.cpp View 4 chunks +8 lines, -3 lines 0 comments Download
M src/views/SkTouchGesture.cpp View 6 chunks +8 lines, -7 lines 0 comments Download
M tests/PathOpsSkpClipTest.cpp View 1 2 5 chunks +8 lines, -8 lines 0 comments Download
M tests/SkpSkGrTest.cpp View 1 4 chunks +6 lines, -6 lines 0 comments Download
M tests/StrokerTest.cpp View 15 chunks +72 lines, -65 lines 0 comments Download
M tests/Test.h View 1 chunk +21 lines, -0 lines 0 comments Download
M tests/Test.cpp View 1 chunk +14 lines, -0 lines 0 comments Download
M tests/skia_test.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 43 (23 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1811613004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1811613004/20001
4 years, 9 months ago (2016-03-17 18:31:25 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-17 18:51:39 UTC) #8
dogben
4 years, 9 months ago (2016-03-17 19:46:56 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1811613004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1811613004/40001
4 years, 9 months ago (2016-03-18 19:13:39 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Ubuntu-GCC-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-Trybot/builds/7185)
4 years, 9 months ago (2016-03-18 19:15:50 UTC) #17
mtklein
lgtm https://codereview.chromium.org/1811613004/diff/40001/include/core/SkTime.h File include/core/SkTime.h (right): https://codereview.chromium.org/1811613004/diff/40001/include/core/SkTime.h#newcode37 include/core/SkTime.h:37: static double GetSecs() { return GetNSecs() * 1e-9; ...
4 years, 9 months ago (2016-03-22 13:35:39 UTC) #18
mtklein
lgtm lgtm https://codereview.chromium.org/1811613004/diff/40001/include/core/SkTime.h File include/core/SkTime.h (right): https://codereview.chromium.org/1811613004/diff/40001/include/core/SkTime.h#newcode37 include/core/SkTime.h:37: static double GetSecs() { return GetNSecs() * ...
4 years, 9 months ago (2016-03-22 13:35:40 UTC) #19
dogben
https://codereview.chromium.org/1811613004/diff/40001/include/core/SkTime.h File include/core/SkTime.h (right): https://codereview.chromium.org/1811613004/diff/40001/include/core/SkTime.h#newcode37 include/core/SkTime.h:37: static double GetSecs() { return GetNSecs() * 1e-9; } ...
4 years, 9 months ago (2016-03-22 17:12:51 UTC) #20
mtklein
> It's used in src/views/SkTouchGesture.cpp, but I'm happy to manually inline > that. Ah, either ...
4 years, 9 months ago (2016-03-22 17:25:52 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1811613004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1811613004/60001
4 years, 9 months ago (2016-03-22 17:30:34 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-22 17:49:18 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1811613004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1811613004/60001
4 years, 9 months ago (2016-03-22 17:57:01 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: skia_presubmit-Trybot on client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/7940)
4 years, 9 months ago (2016-03-22 17:58:27 UTC) #30
dogben
4 years, 9 months ago (2016-03-22 18:00:56 UTC) #32
dogben
reed, PTAL at API changes: - Addition of SkTime::GetSecs. - Change return type of SkTime::GetMSecs. ...
4 years, 9 months ago (2016-03-24 23:32:56 UTC) #33
reed1
lgtm
4 years, 9 months ago (2016-03-25 12:33:12 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1811613004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1811613004/60001
4 years, 9 months ago (2016-03-25 13:59:40 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac-Clang-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac-Clang-x86_64-Release-Trybot/builds/1488)
4 years, 9 months ago (2016-03-25 14:00:52 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1811613004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1811613004/80001
4 years, 9 months ago (2016-03-25 19:44:58 UTC) #41
commit-bot: I haz the power
4 years, 9 months ago (2016-03-25 19:59:56 UTC) #43
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://skia.googlesource.com/skia/+/ec4d4d784dbb250e572f8e04d18d0fd2ebeee851

Powered by Google App Engine
This is Rietveld 408576698