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

Unified Diff: Source/core/html/HTMLCanvasElement.h

Issue 181693006: Refactoring source image usage in CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: applied last corrections Created 6 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
« no previous file with comments | « Source/core/frame/ImageBitmap.cpp ('k') | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCanvasElement.h
diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h
index 88ab866e8a51534575039c07b19336efe0dfe468..d42444e141a6bc8111443180999fa6717c623f9f 100644
--- a/Source/core/html/HTMLCanvasElement.h
+++ b/Source/core/html/HTMLCanvasElement.h
@@ -29,6 +29,7 @@
#define HTMLCanvasElement_h
#include "core/html/HTMLElement.h"
+#include "core/html/canvas/CanvasImageSource.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/Canvas2DLayerBridge.h"
@@ -59,7 +60,7 @@ public:
virtual void canvasDestroyed(HTMLCanvasElement*) = 0;
};
-class HTMLCanvasElement FINAL : public HTMLElement, public DocumentVisibilityObserver {
+class HTMLCanvasElement FINAL : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource {
public:
static PassRefPtr<HTMLCanvasElement> create(Document&);
virtual ~HTMLCanvasElement();
@@ -115,8 +116,8 @@ public:
void clearPresentationCopy();
SecurityOrigin* securityOrigin() const;
- void setOriginTainted() { m_originClean = false; }
bool originClean() const { return m_originClean; }
+ void setOriginTainted() { m_originClean = false; }
AffineTransform baseTransform() const;
@@ -131,6 +132,11 @@ public:
// DocumentVisibilityObserver implementation
virtual void didChangeVisibilityState(PageVisibilityState) OVERRIDE;
+ // CanvasImageSource implementation
+ virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceImageStatus*) const OVERRIDE;
+ virtual bool wouldTaintOrigin(SecurityOrigin*) const OVERRIDE;
+ virtual FloatSize sourceSize() const OVERRIDE;
+
protected:
virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE;
« no previous file with comments | « Source/core/frame/ImageBitmap.cpp ('k') | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698