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

Unified Diff: third_party/WebKit/public/platform/WebMediaPlayer.h

Issue 2476693002: WebGL & 16-bit video stream: upload to FLOAT texture. (Closed)
Patch Set: Nits. Created 4 years 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 | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebMediaPlayer.h
diff --git a/third_party/WebKit/public/platform/WebMediaPlayer.h b/third_party/WebKit/public/platform/WebMediaPlayer.h
index 792328531796a3b0b2a1c7f682cfdaf51f79012e..68439a87c2b8b9f0eced4cbf8b7583a7fe7bd2c8 100644
--- a/third_party/WebKit/public/platform/WebMediaPlayer.h
+++ b/third_party/WebKit/public/platform/WebMediaPlayer.h
@@ -105,6 +105,14 @@ class WebMediaPlayer {
typedef WebString TrackId;
enum TrackType { TextTrack, AudioTrack, VideoTrack };
+ // This must stay in sync with WebGLRenderingContextBase::TexImageFunctionID.
+ enum TexImageFunctionID {
+ TexImage2D,
+ TexSubImage2D,
+ TexImage3D,
+ TexSubImage3D
+ };
+
virtual ~WebMediaPlayer() {}
virtual void load(LoadType, const WebMediaPlayerSource&, CORSMode) = 0;
@@ -208,6 +216,30 @@ class WebMediaPlayer {
return false;
}
+ // Do tex(Sub)Image2D/3D for current frame. If it is not implemented for given
+ // parameters or fails, it returns false.
+ // The method is wrapping calls to glTexImage2D, glTexSubImage2D,
+ // glTexImage3D and glTexSubImage3D and parameters have the same name and
+ // meaning.
+ // Texture needs to be created and bound to active texture unit before this
+ // call. In addition, TexSubImage2D and TexSubImage3D require that previous
+ // TexImage2D and TexSubImage3D calls, respectivelly, defined the texture
+ // content.
+ virtual bool texImageImpl(TexImageFunctionID functionID,
pdr. 2016/12/02 21:17:07 Does this need to be virtual?
aleksandar.stojiljkovic 2016/12/02 21:28:51 Yes. It gets overridden in WebMediaPlayer_MS where
+ unsigned target,
+ gpu::gles2::GLES2Interface* gl,
+ int level,
+ int internalformat,
+ unsigned format,
+ unsigned type,
+ int xoffset,
+ int yoffset,
+ int zoffset,
+ bool flipY,
+ bool premultiplyAlpha) {
+ return false;
+ }
+
virtual WebAudioSourceProvider* getAudioSourceProvider() { return nullptr; }
virtual void setContentDecryptionModule(
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698