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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2199093002: Optimize webgl texImage2D from YUV video textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | media/renderers/skcanvas_video_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 6da13ceed5a23238ff79a76c82de83de1cb63b8d..16a43350dd6e9ea8dc7ad41c112182fc85006269 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -773,15 +773,16 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture(
scoped_refptr<VideoFrame> video_frame = GetCurrentFrameFromCompositor();
- if (!video_frame.get() || !video_frame->HasTextures() ||
- media::VideoFrame::NumPlanes(video_frame->format()) != 1) {
+ if (!video_frame.get() || !video_frame->HasTextures()) {
return false;
}
- SkCanvasVideoRenderer::CopyVideoFrameSingleTextureToGLTexture(
- gl, video_frame.get(), texture, internal_format, type, premultiply_alpha,
- flip_y);
- return true;
+ Context3D context_3d;
+ if (!context_3d_cb_.is_null())
+ context_3d = context_3d_cb_.Run();
+ return skcanvas_video_renderer_.CopyVideoFrameTexturesToGLTexture(
+ context_3d, gl, video_frame.get(), texture, internal_format, type,
+ premultiply_alpha, flip_y);
}
void WebMediaPlayerImpl::setContentDecryptionModule(
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | media/renderers/skcanvas_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698