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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1154153003: Relanding 1143663007: VideoFrame: Separate Pixel Format from Storage Type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NV12 support in CrOS Created 5 years, 7 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 | « media/blink/video_frame_compositor.cc ('k') | media/cast/test/end2end_unittest.cc » ('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 f48f982cc909380758c40b81a651c21fa39097ed..da8feecc54b873831a94d4e3535efb102ff13c33 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -510,16 +510,14 @@ void WebMediaPlayerImpl::paint(blink::WebCanvas* canvas,
// - We haven't reached HAVE_CURRENT_DATA and need to paint black
// - We're painting to a canvas
// See http://crbug.com/341225 http://crbug.com/342621 for details.
- scoped_refptr<VideoFrame> video_frame =
- GetCurrentFrameFromCompositor();
+ scoped_refptr<VideoFrame> video_frame = GetCurrentFrameFromCompositor();
gfx::Rect gfx_rect(rect);
Context3D context_3d;
if (video_frame.get() &&
- video_frame->format() == VideoFrame::NATIVE_TEXTURE) {
- if (!context_3d_cb_.is_null()) {
+ video_frame->storage_type() == VideoFrame::STORAGE_TEXTURE) {
+ if (!context_3d_cb_.is_null())
context_3d = context_3d_cb_.Run();
- }
// GPU Process crashed.
if (!context_3d.gl)
return;
@@ -594,11 +592,10 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture(
bool flip_y) {
TRACE_EVENT0("media", "WebMediaPlayerImpl:copyVideoTextureToPlatformTexture");
- scoped_refptr<VideoFrame> video_frame =
- GetCurrentFrameFromCompositor();
+ scoped_refptr<VideoFrame> video_frame = GetCurrentFrameFromCompositor();
if (!video_frame.get() ||
- video_frame->format() != VideoFrame::NATIVE_TEXTURE) {
+ video_frame->storage_type() != VideoFrame::STORAGE_TEXTURE) {
return false;
}
« no previous file with comments | « media/blink/video_frame_compositor.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698