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

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

Issue 2716853002: (WIP) Worker: Merge ParentFrameTaskRunners into TaskRunnerHelper
Patch Set: WIP Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CanvasAsyncBlobCreator_h 5 #ifndef CanvasAsyncBlobCreator_h
6 #define CanvasAsyncBlobCreator_h 6 #define CanvasAsyncBlobCreator_h
7 7
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/dom/DOMTypedArray.h" 10 #include "core/dom/DOMTypedArray.h"
11 #include "core/fileapi/BlobCallback.h" 11 #include "core/fileapi/BlobCallback.h"
12 #include "core/workers/ParentFrameTaskRunners.h"
13 #include "platform/geometry/IntSize.h" 12 #include "platform/geometry/IntSize.h"
14 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
15 #include "public/platform/WebTraceLocation.h" 14 #include "public/platform/WebTraceLocation.h"
16 #include "wtf/Vector.h" 15 #include "wtf/Vector.h"
17 #include "wtf/text/WTFString.h" 16 #include "wtf/text/WTFString.h"
18 #include <memory> 17 #include <memory>
19 18
20 namespace blink { 19 namespace blink {
21 20
22 class Document; 21 class Document;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 110
112 const IntSize m_size; 111 const IntSize m_size;
113 size_t m_pixelRowStride; 112 size_t m_pixelRowStride;
114 const MimeType m_mimeType; 113 const MimeType m_mimeType;
115 double m_startTime; 114 double m_startTime;
116 double m_scheduleInitiateStartTime; 115 double m_scheduleInitiateStartTime;
117 double m_elapsedTime; 116 double m_elapsedTime;
118 117
119 ToBlobFunctionType m_functionType; 118 ToBlobFunctionType m_functionType;
120 119
121 // Used when CanvasAsyncBlobCreator runs on main thread only
122 Member<ParentFrameTaskRunners> m_parentFrameTaskRunner;
123
124 // Used for HTMLCanvasElement only 120 // Used for HTMLCanvasElement only
125 Member<BlobCallback> m_callback; 121 Member<BlobCallback> m_callback;
126 122
127 // Used for OffscreenCanvas only 123 // Used for OffscreenCanvas only
128 Member<ScriptPromiseResolver> m_scriptPromiseResolver; 124 Member<ScriptPromiseResolver> m_scriptPromiseResolver;
129 125
130 // PNG 126 // PNG
131 bool initializePngStruct(); 127 bool initializePngStruct();
132 void forceEncodeRowsPngOnCurrentThread(); // Similar to idleEncodeRowsPng 128 void forceEncodeRowsPngOnCurrentThread(); // Similar to idleEncodeRowsPng
133 // without deadline 129 // without deadline
134 130
135 // JPEG 131 // JPEG
136 bool initializeJpegStruct(double quality); 132 bool initializeJpegStruct(double quality);
137 void forceEncodeRowsJpegOnCurrentThread(); // Similar to idleEncodeRowsJpeg 133 void forceEncodeRowsJpegOnCurrentThread(); // Similar to idleEncodeRowsJpeg
138 // without 134 // without
139 // deadline 135 // deadline
140 136
141 // WEBP 137 // WEBP
142 void encodeImageOnEncoderThread(double quality); 138 void encodeImageOnEncoderThread(double quality);
143 139
144 void idleTaskStartTimeoutEvent(double quality); 140 void idleTaskStartTimeoutEvent(double quality);
145 void idleTaskCompleteTimeoutEvent(); 141 void idleTaskCompleteTimeoutEvent();
146 }; 142 };
147 143
148 } // namespace blink 144 } // namespace blink
149 145
150 #endif // CanvasAsyncBlobCreator_h 146 #endif // CanvasAsyncBlobCreator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698