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

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

Issue 1775153002: Make OffscreenCanvasRenderingContext2D renderable on a worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
diff --git a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
index abfc4194fb319505260021989cd756d7547d6d99..0e2e9575a340d55b1b397c6b257aad6e403f2d91 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
+++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
@@ -15,6 +15,7 @@
namespace blink {
class CanvasContextCreationAttributes;
+class ImageBitmap;
class OffscreenCanvasRenderingContext;
class OffscreenCanvasRenderingContext2D;
class OffscreenCanvasRenderingContextFactory;
@@ -23,15 +24,19 @@ class MODULES_EXPORT OffscreenCanvas final : public GarbageCollectedFinalized<Of
DEFINE_WRAPPERTYPEINFO();
public:
static OffscreenCanvas* create(unsigned width, unsigned height);
- ~OffscreenCanvas() {}
+ ~OffscreenCanvas();
- IntSize size() const { return m_size; }
+ // IDL attributes
unsigned width() const { return m_size.width(); }
unsigned height() const { return m_size.height(); }
void setWidth(unsigned);
void setHeight(unsigned);
+ // API Methods
OffscreenCanvasRenderingContext2D* getContext(const String&, const CanvasContextCreationAttributes&);
+ PassRefPtrWillBeRawPtr<ImageBitmap> transferToImageBitmap(ExceptionState&);
+
+ IntSize size() const { return m_size; }
OffscreenCanvasRenderingContext2D* renderingContext() const;
static void registerRenderingContextFactory(PassOwnPtr<OffscreenCanvasRenderingContextFactory>);

Powered by Google App Engine
This is Rietveld 408576698