Chromium Code Reviews| Index: webkit/media/webmediaplayer_impl.cc |
| diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc |
| index 804135b658bcfefad732d60d2c56c35e0580e914..25844ffab61ec76030770e8762f6638ae99d2972 100644 |
| --- a/webkit/media/webmediaplayer_impl.cc |
| +++ b/webkit/media/webmediaplayer_impl.cc |
| @@ -25,6 +25,7 @@ |
| #include "media/filters/audio_renderer_impl.h" |
| #include "media/filters/chunk_demuxer.h" |
| #include "media/filters/video_renderer_base.h" |
| +#include "third_party/khronos/GLES2/gl2.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| @@ -670,6 +671,27 @@ void WebMediaPlayerImpl::putCurrentFrame( |
| delete web_video_frame; |
| } |
| +bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( |
| + WebKit::WebGraphicsContext3D* webGraphicsContext, |
|
scherkus (not reviewing)
2013/03/08 20:17:37
web_graphics_context
|
| + unsigned int texture, |
| + unsigned int level, |
| + unsigned int internalFormat) { |
|
scherkus (not reviewing)
2013/03/08 20:17:37
internal_format
|
| + scoped_refptr<media::VideoFrame> video_frame; |
| + { |
| + base::AutoLock auto_lock(lock_); |
| + video_frame = current_frame_; |
| + } |
| + if (video_frame |
|
scherkus (not reviewing)
2013/03/08 20:17:37
chromium puts && at the end of lines
|
| + && video_frame->format() == media::VideoFrame::NATIVE_TEXTURE |
| + && video_frame->texture_target() == GL_TEXTURE_2D) { |
| + uint32 sourceTexture = video_frame->texture_id(); |
|
scherkus (not reviewing)
2013/03/08 20:17:37
source_texture
|
| + webGraphicsContext->copyTextureCHROMIUM(GL_TEXTURE_2D, |
| + sourceTexture, texture, level, internalFormat); |
| + return true; |
| + } |
| + return false; |
| +} |
| + |
| // Helper enum for reporting generateKeyRequest/addKey histograms. |
| enum MediaKeyException { |
| kUnknownResultId, |