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

Side by Side Diff: dm/DM.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 | « no previous file | gm/SkAnimTimer.h » ('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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "DMJsonWriter.h" 9 #include "DMJsonWriter.h"
10 #include "DMSrcSink.h" 10 #include "DMSrcSink.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 "this list, no image is written for that result."); 66 "this list, no image is written for that result.");
67 67
68 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); 68 DEFINE_int32(shards, 1, "We're splitting source data into this many shards.");
69 DEFINE_int32(shard, 0, "Which shard do I run?"); 69 DEFINE_int32(shard, 0, "Which shard do I run?");
70 DEFINE_bool(simpleCodec, false, "Only decode images to native scale"); 70 DEFINE_bool(simpleCodec, false, "Only decode images to native scale");
71 71
72 using namespace DM; 72 using namespace DM;
73 73
74 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 74 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
75 75
76 static const SkMSec kStartMs = SkTime::GetMSecs(); 76 static const double kStartMs = SkTime::GetMSecs();
77 77
78 static FILE* gVLog; 78 static FILE* gVLog;
79 79
80 template <typename... Args> 80 template <typename... Args>
81 static void vlog(const char* fmt, Args&&... args) { 81 static void vlog(const char* fmt, Args&&... args) {
82 if (gVLog) { 82 if (gVLog) {
83 fprintf(gVLog, "%s\t", HumanizeMs(SkTime::GetMSecs() - kStartMs).c_str() ); 83 fprintf(gVLog, "%s\t", HumanizeMs(SkTime::GetMSecs() - kStartMs).c_str() );
84 fprintf(gVLog, fmt, args...); 84 fprintf(gVLog, fmt, args...);
85 fflush(gVLog); 85 fflush(gVLog);
86 } 86 }
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 Reporter* reporter, 1493 Reporter* reporter,
1494 GrContextFactory* fac tory); 1494 GrContextFactory* fac tory);
1495 } // namespace skiatest 1495 } // namespace skiatest
1496 1496
1497 #if !defined(SK_BUILD_FOR_IOS) 1497 #if !defined(SK_BUILD_FOR_IOS)
1498 int main(int argc, char** argv) { 1498 int main(int argc, char** argv) {
1499 SkCommandLineFlags::Parse(argc, argv); 1499 SkCommandLineFlags::Parse(argc, argv);
1500 return dm_main(); 1500 return dm_main();
1501 } 1501 }
1502 #endif 1502 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/SkAnimTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698