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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h

Issue 2039673002: Track performance of toBlob and its complete timeout delay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better categorization Created 4 years, 6 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: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
index 64152fb3c0a5e14841d3073b9220150604079942..a2e9bb3535c15fd3eb54699b42d220517818fb46 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
@@ -35,6 +35,12 @@ public:
IdleTaskSwitchedToMainThreadTask,
IdleTaskNotSupported // Idle tasks are not implemented for some image types
};
+ // enum used histogram
+ enum IdleTaskTimeoutType {
+ IdleTaskStartTimeout,
+ IdleTaskCompleteTimeout,
+ IdleTaskTimeoutSupported
+ };
// Methods are virtual for mocking in unit tests
virtual void signalTaskSwitchInStartTimeoutEventForTesting() { }
virtual void signalTaskSwitchInCompleteTimeoutEventForTesting() { }
@@ -73,6 +79,8 @@ private:
size_t m_pixelRowStride;
const MimeType m_mimeType;
CrossThreadPersistent<BlobCallback> m_callback;
+ double m_startTime;
+ void recordTimeoutEvent(IdleTaskTimeoutType);
// PNG
bool initializePngStruct();
@@ -85,8 +93,8 @@ private:
// WEBP
void encodeImageOnEncoderThread(double quality);
- void idleTaskStartTimeoutEvent(double quality);
- void idleTaskCompleteTimeoutEvent();
+ void idleTaskStartTimeoutEvent(double quality, double startTime);
+ void idleTaskCompleteTimeoutEvent(double startTime);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698