Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
index 7173957a4058858e351c7dfdc0b3cc0cc92042ce..aab36f860151615d00b3cf8ca0d25254bc9dd7c4 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
@@ -31,6 +31,7 @@ |
#include "bindings/core/v8/ScriptValue.h" |
#include "bindings/core/v8/UnionTypesCore.h" |
#include "core/CoreExport.h" |
+#include "core/dom/DOMTypedArray.h" |
#include "core/dom/Document.h" |
#include "core/dom/DocumentVisibilityObserver.h" |
#include "core/fileapi/FileCallback.h" |
@@ -42,6 +43,7 @@ |
#include "platform/graphics/GraphicsTypes3D.h" |
#include "platform/graphics/ImageBufferClient.h" |
#include "platform/heap/Handle.h" |
+#include "public/platform/WebThread.h" |
#define CanvasDefaultInterpolationQuality InterpolationLow |
@@ -78,6 +80,9 @@ public: |
DECLARE_NODE_FACTORY(HTMLCanvasElement); |
~HTMLCanvasElement() override; |
+ static PassOwnPtr<WebThread> getToBlobThreadInstance(); |
Justin Novosad
2015/09/24 20:51:31
This is not a proper use of PassOwnPtr. I really t
|
+ static int s_numCanvasInstances; |
+ |
void addObserver(CanvasObserver*); |
void removeObserver(CanvasObserver*); |
@@ -114,7 +119,7 @@ public: |
String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const; |
String toDataURL(const String& mimeType, ExceptionState& exceptionState) const { return toDataURL(mimeType, ScriptValue(), exceptionState); } |
- void toBlob(FileCallback*, const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const; |
+ void toBlob(FileCallback*, const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&); |
void toBlob(FileCallback* callback, const String& mimeType, ExceptionState& exceptionState) { return toBlob(callback, mimeType, ScriptValue(), exceptionState); } |
// Used for rendering |
@@ -209,7 +214,10 @@ private: |
bool paintsIntoCanvasBuffer() const; |
ImageData* toImageData(SourceDrawingBuffer) const; |
- String toDataURLInternal(const String& mimeType, const double* quality, SourceDrawingBuffer) const; |
+ String toDataURLInternal(const String& mimeType, const double& quality, SourceDrawingBuffer) const; |
+ |
+ void encodeImageAsync(DOMUint8ClampedArray* imagedata, IntSize imageSize, FileCallback*, const String& mimeType, double quality); |
+ void createBlobAndCall(PassOwnPtr<Vector<char>> encodedImage, const String& mimeType, FileCallback*); |
WillBeHeapHashSet<RawPtrWillBeWeakMember<CanvasObserver>> m_observers; |