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

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

Issue 1421873005: Revert of "webgl: optimize webgl.texSubImage2D(video) path." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.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 cf26022dd57a1da0b49f38e6a0e3a8d8736c58f2..9670be708b07fb7e817505c80246021d29f37898 100644
--- a/third_party/WebKit/public/platform/WebMediaPlayer.h
+++ b/third_party/WebKit/public/platform/WebMediaPlayer.h
@@ -164,32 +164,17 @@
virtual void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermode::Mode) = 0;
+ // TODO(dshwang): remove non-|target| version. crbug.com/349871
+ virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsigned texture, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; }
+
// Do a GPU-GPU textures copy. If the copy is impossible or fails, it returns false.
- // Copy the video frame texture to full texture or sub texture depending on |copyType|.
- // If FullCopy, |xoffset| and |yoffset| must be 0.
- // If SubCopy, |internalFormat| and |type| must be GL_FALSE.
- struct CopyVideoTextureParams {
- enum CopyType { FullCopy, SubCopy };
- CopyVideoTextureParams(CopyType copyType, unsigned target,
- unsigned texture, unsigned internalFormat, unsigned type, int level,
- int xoffset, int yoffset, bool premultiplyAlpha, bool flipY)
- : copyType(copyType), target(target), texture(texture)
- , internalFormat(internalFormat) , type(type), level(level)
- , xoffset(xoffset), yoffset(yoffset)
- , premultiplyAlpha(premultiplyAlpha), flipY(flipY)
- { }
- CopyType copyType;
- unsigned target;
- unsigned texture;
- unsigned internalFormat;
- unsigned type;
- int level;
- int xoffset;
- int yoffset;
- bool premultiplyAlpha;
- bool flipY;
- };
- virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, const CopyVideoTextureParams&) = 0;
+ virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsigned target,
+ unsigned texture, unsigned internalFormat, unsigned type, int level,
+ bool premultiplyAlpha, bool flipY) { return false; }
+ // Copy sub video frame texture to |texture|. If the copy is impossible or fails, it returns false.
+ virtual bool copyVideoSubTextureToPlatformTexture(WebGraphicsContext3D*, unsigned target,
+ unsigned texture, int level, int xoffset, int yoffset, bool premultiplyAlpha,
+ bool flipY) { return false; }
virtual WebAudioSourceProvider* audioSourceProvider() { return nullptr; }
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698