Chromium Code Reviews| 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 9670be708b07fb7e817505c80246021d29f37898..8f8e363f550756253713ff66b88fb611726de44c 100644 |
| --- a/third_party/WebKit/public/platform/WebMediaPlayer.h |
| +++ b/third_party/WebKit/public/platform/WebMediaPlayer.h |
| @@ -164,17 +164,33 @@ public: |
| 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. |
| - 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; } |
| + // 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() = delete; |
|
philipj_slow
2015/10/27 16:02:17
Is this actually needed, doesn't declaring a const
dshwang
2015/10/27 16:18:01
good point. it's not needed. I removed it in the n
|
| + 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 WebAudioSourceProvider* audioSourceProvider() { return nullptr; } |