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 |