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

Unified Diff: Source/core/html/HTMLVideoElement.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/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLVideoElement.h
diff --git a/Source/core/html/HTMLVideoElement.h b/Source/core/html/HTMLVideoElement.h
index 31690dddc622673e663c1ebe0a0dc22a8d9af0cd..02e82e1b0e39714f8fab85d84326e5eda2ce8f40 100644
--- a/Source/core/html/HTMLVideoElement.h
+++ b/Source/core/html/HTMLVideoElement.h
@@ -27,6 +27,7 @@
#define HTMLVideoElement_h
#include "core/html/HTMLMediaElement.h"
+#include "core/html/canvas/CanvasImageSource.h"
namespace blink {
class WebGraphicsContext3D;
@@ -37,7 +38,7 @@ namespace WebCore {
class ExceptionState;
class HTMLImageLoader;
-class HTMLVideoElement FINAL : public HTMLMediaElement {
+class HTMLVideoElement FINAL : public HTMLMediaElement, public CanvasImageSource {
public:
static PassRefPtr<HTMLVideoElement> create(Document&);
@@ -49,7 +50,7 @@ public:
unsigned webkitDroppedFrameCount() const;
// Used by canvas to gain raw pixel access
- void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
+ void paintCurrentFrameInContext(GraphicsContext*, const IntRect&) const;
// Used by WebGL to do GPU-GPU textures copy if possible.
// See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defined in Source/WebCore/platform/graphics/MediaPlayer.h.
@@ -62,6 +63,12 @@ public:
// FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not depend on it.
virtual KURL mediaPlayerPosterURL() OVERRIDE;
+ // CanvasImageSource implementation
+ virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceImageStatus*) const OVERRIDE;
+ virtual bool isVideoElement() const OVERRIDE { return true; }
+ virtual bool wouldTaintOrigin(SecurityOrigin*) const OVERRIDE;
+ virtual FloatSize sourceSize() const OVERRIDE;
+
private:
HTMLVideoElement(Document&);
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698