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

Side by Side Diff: media/blink/video_frame_compositor.cc

Issue 809883004: Revert hardware decoder changes causing ChromeOS HW test crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « media/base/video_frame.cc ('k') | media/filters/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/video_frame_compositor.h" 5 #include "media/blink/video_frame_compositor.h"
6 6
7 #include "media/base/video_frame.h" 7 #include "media/base/video_frame.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 static bool IsOpaque(const scoped_refptr<VideoFrame>& frame) { 11 static bool IsOpaque(const scoped_refptr<VideoFrame>& frame) {
12 switch (frame->format()) { 12 switch (frame->format()) {
13 case VideoFrame::UNKNOWN: 13 case VideoFrame::UNKNOWN:
14 case VideoFrame::YV12: 14 case VideoFrame::YV12:
15 case VideoFrame::YV12J: 15 case VideoFrame::YV12J:
16 case VideoFrame::YV16: 16 case VideoFrame::YV16:
17 case VideoFrame::I420: 17 case VideoFrame::I420:
18 case VideoFrame::YV24: 18 case VideoFrame::YV24:
19 case VideoFrame::NV12: 19 case VideoFrame::NV12:
20 return true; 20 return true;
21 21
22 case VideoFrame::YV12A: 22 case VideoFrame::YV12A:
23 #if defined(VIDEO_HOLE) 23 #if defined(VIDEO_HOLE)
24 case VideoFrame::HOLE: 24 case VideoFrame::HOLE:
25 #endif // defined(VIDEO_HOLE) 25 #endif // defined(VIDEO_HOLE)
26 case VideoFrame::NATIVE_TEXTURE: 26 case VideoFrame::NATIVE_TEXTURE:
27 case VideoFrame::ARGB:
28 break; 27 break;
29 } 28 }
30 return false; 29 return false;
31 } 30 }
32 31
33 VideoFrameCompositor::VideoFrameCompositor( 32 VideoFrameCompositor::VideoFrameCompositor(
34 const base::Callback<void(gfx::Size)>& natural_size_changed_cb, 33 const base::Callback<void(gfx::Size)>& natural_size_changed_cb,
35 const base::Callback<void(bool)>& opacity_changed_cb) 34 const base::Callback<void(bool)>& opacity_changed_cb)
36 : natural_size_changed_cb_(natural_size_changed_cb), 35 : natural_size_changed_cb_(natural_size_changed_cb),
37 opacity_changed_cb_(opacity_changed_cb), 36 opacity_changed_cb_(opacity_changed_cb),
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 opacity_changed_cb_.Run(IsOpaque(frame)); 68 opacity_changed_cb_.Run(IsOpaque(frame));
70 } 69 }
71 70
72 current_frame_ = frame; 71 current_frame_ = frame;
73 72
74 if (client_) 73 if (client_)
75 client_->DidReceiveFrame(); 74 client_->DidReceiveFrame();
76 } 75 }
77 76
78 } // namespace media 77 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame.cc ('k') | media/filters/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698