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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLVideoElement.h

Issue 2026803002: Avoid GPU readback in tex(Sub)Image2D(ImageBitmap) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address kbr@'s comments Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 bool hasAvailableVideoFrame() const; 77 bool hasAvailableVideoFrame() const;
78 78
79 KURL posterImageURL() const override; 79 KURL posterImageURL() const override;
80 80
81 // CanvasImageSource implementation 81 // CanvasImageSource implementation
82 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi nt, SnapshotReason, const FloatSize&) const override; 82 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi nt, SnapshotReason, const FloatSize&) const override;
83 bool isVideoElement() const override { return true; } 83 bool isVideoElement() const override { return true; }
84 bool wouldTaintOrigin(SecurityOrigin*) const override; 84 bool wouldTaintOrigin(SecurityOrigin*) const override;
85 FloatSize elementSize(const FloatSize&) const override; 85 FloatSize elementSize(const FloatSize&) const override;
86 const KURL& sourceURL() const override { return currentSrc(); } 86 const KURL& sourceURL() const override { return currentSrc(); }
87
88 bool isHTMLVideoElement() const override { return true; } 87 bool isHTMLVideoElement() const override { return true; }
88 int sourceWidth() override { return videoWidth(); }
89 int sourceHeight() override { return videoHeight(); }
89 90
90 // ImageBitmapSource implementation 91 // ImageBitmapSource implementation
91 IntSize bitmapSourceSize() const override; 92 IntSize bitmapSourceSize() const override;
92 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override; 93 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override;
93 94
94 private: 95 private:
95 HTMLVideoElement(Document&); 96 HTMLVideoElement(Document&);
96 97
97 bool layoutObjectIsNeeded(const ComputedStyle&) override; 98 bool layoutObjectIsNeeded(const ComputedStyle&) override;
98 LayoutObject* createLayoutObject(const ComputedStyle&) override; 99 LayoutObject* createLayoutObject(const ComputedStyle&) override;
99 void attach(const AttachContext& = AttachContext()) override; 100 void attach(const AttachContext& = AttachContext()) override;
100 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; 101 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override;
101 bool isPresentationAttribute(const QualifiedName&) const override; 102 bool isPresentationAttribute(const QualifiedName&) const override;
102 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic String&, MutableStylePropertySet*) override; 103 void collectStyleForPresentationAttribute(const QualifiedName&, const Atomic String&, MutableStylePropertySet*) override;
103 bool isURLAttribute(const Attribute&) const override; 104 bool isURLAttribute(const Attribute&) const override;
104 const AtomicString imageSourceURL() const override; 105 const AtomicString imageSourceURL() const override;
105 106
106 void updateDisplayState() override; 107 void updateDisplayState() override;
107 void didMoveToNewDocument(Document& oldDocument) override; 108 void didMoveToNewDocument(Document& oldDocument) override;
108 void setDisplayMode(DisplayMode) override; 109 void setDisplayMode(DisplayMode) override;
109 110
110 Member<HTMLImageLoader> m_imageLoader; 111 Member<HTMLImageLoader> m_imageLoader;
111 112
112 AtomicString m_defaultPosterURL; 113 AtomicString m_defaultPosterURL;
113 }; 114 };
114 115
115 } // namespace blink 116 } // namespace blink
116 117
117 #endif // HTMLVideoElement_h 118 #endif // HTMLVideoElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698