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

Unified Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h

Issue 2420203002: Implement convertToBlob() in OffscreenCanvas (Closed)
Patch Set: rebase and fix global-interface-listing-service-worker-expected.txt Created 4 years, 2 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/offscreencanvas/OffscreenCanvas.h
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
index 070c7481438d00f44b73b018729306e4b6f51408..14bc8c8fd9aa522d2d4fb140dc1a1841eee5e66a 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
@@ -10,6 +10,7 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/canvas/CanvasImageSource.h"
+#include "core/offscreencanvas/ImageEncodeOptions.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/OffscreenCanvasFrameDispatcher.h"
#include "platform/heap/Handle.h"
@@ -41,6 +42,9 @@ class CORE_EXPORT OffscreenCanvas final
// API Methods
ImageBitmap* transferToImageBitmap(ExceptionState&);
+ ScriptPromise convertToBlob(ScriptState*,
+ const ImageEncodeOptions&,
+ ExceptionState&);
IntSize size() const { return m_size; }
void setAssociatedCanvasId(int canvasId) { m_canvasId = canvasId; }
@@ -105,6 +109,7 @@ class CORE_EXPORT OffscreenCanvas final
Member<CanvasRenderingContext> m_context;
int m_canvasId = -1; // DOMNodeIds starts from 0, using -1 to indicate no
// associated canvas element.
+
IntSize m_size;
bool m_isNeutered = false;

Powered by Google App Engine
This is Rietveld 408576698