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

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: correctly accumulate idle time slices 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 0bb35edfa2a2d5354e7b6dc7849d45f17b674c76..164bf85a4b46dea8f0172b3031ed597da4157dfc 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
@@ -18,7 +18,7 @@ class JPEGImageEncoderState;
class CORE_EXPORT CanvasAsyncBlobCreator : public GarbageCollectedFinalized<CanvasAsyncBlobCreator> {
public:
- static CanvasAsyncBlobCreator* create(DOMUint8ClampedArray* unpremultipliedRGBAImageData, const String& mimeType, const IntSize&, BlobCallback*);
+ static CanvasAsyncBlobCreator* create(DOMUint8ClampedArray* unpremultipliedRGBAImageData, const String& mimeType, const IntSize&, BlobCallback*, double);
void scheduleAsyncBlobCreation(bool canUseIdlePeriodScheduling, const double& quality = 0.0);
virtual ~CanvasAsyncBlobCreator();
enum MimeType {
@@ -27,6 +27,7 @@ public:
MimeTypeWebp,
NumberOfMimeTypeSupported
};
+ // enum used in histogram
enum IdleTaskStatus {
IdleTaskNotStarted,
IdleTaskStarted,
@@ -46,7 +47,7 @@ public:
}
protected:
- CanvasAsyncBlobCreator(DOMUint8ClampedArray* data, MimeType, const IntSize&, BlobCallback*);
+ CanvasAsyncBlobCreator(DOMUint8ClampedArray* data, MimeType, const IntSize&, BlobCallback*, double);
// Methods are virtual for unit testing
virtual void scheduleInitiatePngEncoding();
virtual void scheduleInitiateJpegEncoding(const double&);
@@ -76,6 +77,9 @@ private:
size_t m_pixelRowStride;
const MimeType m_mimeType;
Member<BlobCallback> m_callback;
+ double m_startTime;
+ double m_scheduleInitiateStartTime;
+ double m_elapsedTime = 0;
xlai (Olivia) 2016/06/23 17:07:37 Nit: move initialization of this member to the ini
xidachen 2016/06/24 11:17:52 Done.
// PNG
bool initializePngStruct();

Powered by Google App Engine
This is Rietveld 408576698