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

Unified Diff: src/images/SkImageDecoder_libwebp.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, 9 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 side-by-side diff with in-line comments
Download patch
Index: src/images/SkImageDecoder_libwebp.cpp
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp
index 2db08cee83dd5fd3ceb054a2e515ae12af8cd2cf..e3951f8fc706d90bedca2194962a00de313e16d1 100644
--- a/src/images/SkImageDecoder_libwebp.cpp
+++ b/src/images/SkImageDecoder_libwebp.cpp
@@ -131,23 +131,6 @@ private:
#include "SkTime.h"
-class AutoTimeMillis {
-public:
- AutoTimeMillis(const char label[]) :
- fLabel(label) {
- if (nullptr == fLabel) {
- fLabel = "";
- }
- fNow = SkTime::GetMSecs();
- }
- ~AutoTimeMillis() {
- SkDebugf("---- Time (ms): %s %d\n", fLabel, SkTime::GetMSecs() - fNow);
- }
-private:
- const char* fLabel;
- SkMSec fNow;
-};
-
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -286,7 +269,7 @@ bool SkWEBPImageDecoder::setDecodeConfig(SkBitmap* decodedBitmap, int width, int
SkImageDecoder::Result SkWEBPImageDecoder::onDecode(SkStream* stream, SkBitmap* decodedBitmap,
Mode mode) {
#ifdef TIME_DECODE
- AutoTimeMillis atm("WEBP Decode");
+ SkAutoTime atm("WEBP Decode");
#endif
int origWidth, origHeight, hasAlpha;

Powered by Google App Engine
This is Rietveld 408576698