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

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

Issue 1917733004: Reland of: Make OffscreenCanvas Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address all comments Created 4 years, 8 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 39dfe40d0b77c3736d9e45649969fa9d9e1c0032..69051b82067dbb59bf399ecfdee7689caa4b0590 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
@@ -32,9 +32,12 @@ public:
ImageBitmap* transferToImageBitmap(ExceptionState&);
IntSize size() const { return m_size; }
- void setAssociatedCanvas(HTMLCanvasElement* canvas) { m_canvas = canvas; }
- HTMLCanvasElement* getAssociatedCanvas() const { return m_canvas; }
+ void setAssociatedCanvasId(int canvasId) { m_canvasId = canvasId; }
+ int getAssociatedCanvasId() const { return m_canvasId; }
+ bool isNeutered() const { return m_isNeutered; }
+ void setNeutered();
CanvasRenderingContext* getCanvasRenderingContext(const String&, const CanvasContextCreationAttributes&);
+ CanvasRenderingContext* renderingContext() { return m_context; }
static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContextFactory>);
@@ -48,8 +51,9 @@ private:
static CanvasRenderingContextFactory* getRenderingContextFactory(int);
Member<CanvasRenderingContext> m_context;
- WeakMember<HTMLCanvasElement> m_canvas;
+ int m_canvasId = -1; // DOMNodeIds starts from 0, using -1 to indicate no associated canvas element.
IntSize m_size;
+ bool m_isNeutered = false;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698