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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Issue 2294383002: Make OffscreenCanvas a member of CanvasImageSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/html/canvas/CanvasRenderingContext.h
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
index 7ab03585c0b4df9ea1dea9f3860a042cb3be5c99..44eedc6dbd0eb2328e8a95a5360f25616fb7008f 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
@@ -70,6 +70,7 @@ public:
HTMLCanvasElement* canvas() const { return m_canvas; }
+ virtual PassRefPtr<Image> getImage(SnapshotReason) const = 0;
virtual ContextType getContextType() const = 0;
virtual bool isAccelerated() const { return false; }
virtual bool shouldAntialias() const { return false; }
@@ -78,12 +79,11 @@ public:
virtual bool isContextLost() const { return true; }
virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); };
virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { NOTREACHED(); }
+ virtual bool isPaintable() const = 0;
// Return true if the content is updated.
virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) { return false; }
- // Note: this function is strictly for OffscreenCanvas only.
- virtual bool isPaintable() const = 0;
virtual WebLayer* platformLayer() const { return nullptr; }
@@ -127,15 +127,14 @@ public:
// ImageBitmap-specific interface
virtual bool paint(GraphicsContext&, const IntRect&) { return false; }
- virtual PassRefPtr<Image> getImage() const { return nullptr; }
-
- bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr);
- void didMoveToNewDocument(Document*);
// OffscreenCanvas-specific methods
OffscreenCanvas* getOffscreenCanvas() const { return m_offscreenCanvas; }
virtual ImageBitmap* transferToImageBitmap(ExceptionState&) { return nullptr; }
+ bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr);
+ void didMoveToNewDocument(Document*);
+
void detachCanvas() { m_canvas = nullptr; }
protected:

Powered by Google App Engine
This is Rietveld 408576698