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

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

Issue 2159323002: Add tracing AutoOpenCloseEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add forward declaration Created 4 years, 2 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 | « base/trace_event/auto_open_close_event.cc ('k') | media/blink/video_frame_compositor.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 #ifndef MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ 5 #ifndef MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_
6 #define MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ 6 #define MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "base/time/tick_clock.h" 15 #include "base/time/tick_clock.h"
16 #include "base/timer/timer.h" 16 #include "base/timer/timer.h"
17 #include "cc/layers/video_frame_provider.h" 17 #include "cc/layers/video_frame_provider.h"
18 #include "media/base/video_renderer_sink.h" 18 #include "media/base/video_renderer_sink.h"
19 #include "media/blink/media_blink_export.h" 19 #include "media/blink/media_blink_export.h"
20 #include "ui/gfx/geometry/size.h" 20 #include "ui/gfx/geometry/size.h"
21 21
22 namespace base {
23 namespace trace_event {
24 class AutoOpenCloseEvent;
25 }
26 }
27
22 namespace media { 28 namespace media {
23 class VideoFrame; 29 class VideoFrame;
24 30
25 // VideoFrameCompositor acts as a bridge between the media and cc layers for 31 // VideoFrameCompositor acts as a bridge between the media and cc layers for
26 // rendering video frames. I.e. a media::VideoRenderer will talk to this class 32 // rendering video frames. I.e. a media::VideoRenderer will talk to this class
27 // from the media side, while a cc::VideoFrameProvider::Client will talk to it 33 // from the media side, while a cc::VideoFrameProvider::Client will talk to it
28 // from the cc side. 34 // from the cc side.
29 // 35 //
30 // This class is responsible for requesting new frames from a video renderer in 36 // This class is responsible for requesting new frames from a video renderer in
31 // response to requests from the VFP::Client. Since the VFP::Client may stop 37 // response to requests from the VFP::Client. Since the VFP::Client may stop
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 base::TimeTicks last_background_render_; 159 base::TimeTicks last_background_render_;
154 160
155 // These values are set on the compositor thread, but also read on the media 161 // These values are set on the compositor thread, but also read on the media
156 // thread when the VFC is stopped. 162 // thread when the VFC is stopped.
157 scoped_refptr<VideoFrame> current_frame_; 163 scoped_refptr<VideoFrame> current_frame_;
158 164
159 // These values are updated and read from the media and compositor threads. 165 // These values are updated and read from the media and compositor threads.
160 base::Lock callback_lock_; 166 base::Lock callback_lock_;
161 VideoRendererSink::RenderCallback* callback_; 167 VideoRendererSink::RenderCallback* callback_;
162 168
169 // AutoOpenCloseEvent for begin/end events.
170 std::unique_ptr<base::trace_event::AutoOpenCloseEvent> auto_open_close_;
171
163 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor); 172 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor);
164 }; 173 };
165 174
166 } // namespace media 175 } // namespace media
167 176
168 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ 177 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « base/trace_event/auto_open_close_event.cc ('k') | media/blink/video_frame_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698