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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2127053004: Optimize webgl texImage2D from YUV video textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@skianocopy
Patch Set: remove unnecessary change 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 0b76251098e5f95c5021d7f3586a3a9f60e17ea1..6fae8f9f49fad256e0f825794f240780d209cd26 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -819,15 +819,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