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

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: fix formatting 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
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/threading/thread_task_runner_handle.h"
15 #include "base/time/tick_clock.h" 16 #include "base/time/tick_clock.h"
16 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "base/trace_event/auto_open_close_event.h"
17 #include "cc/layers/video_frame_provider.h" 19 #include "cc/layers/video_frame_provider.h"
18 #include "media/base/video_renderer_sink.h" 20 #include "media/base/video_renderer_sink.h"
19 #include "media/blink/media_blink_export.h" 21 #include "media/blink/media_blink_export.h"
20 #include "ui/gfx/geometry/size.h" 22 #include "ui/gfx/geometry/size.h"
21 23
22 namespace media { 24 namespace media {
23 class VideoFrame; 25 class VideoFrame;
24 26
25 // VideoFrameCompositor acts as a bridge between the media and cc layers for 27 // 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 28 // rendering video frames. I.e. a media::VideoRenderer will talk to this class
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 base::TimeTicks last_background_render_; 155 base::TimeTicks last_background_render_;
154 156
155 // These values are set on the compositor thread, but also read on the media 157 // These values are set on the compositor thread, but also read on the media
156 // thread when the VFC is stopped. 158 // thread when the VFC is stopped.
157 scoped_refptr<VideoFrame> current_frame_; 159 scoped_refptr<VideoFrame> current_frame_;
158 160
159 // These values are updated and read from the media and compositor threads. 161 // These values are updated and read from the media and compositor threads.
160 base::Lock callback_lock_; 162 base::Lock callback_lock_;
161 VideoRendererSink::RenderCallback* callback_; 163 VideoRendererSink::RenderCallback* callback_;
162 164
165 // AutoOpenCloseEvent for begin/end events. We need to also store the
166 // task runner on which this class is constructed (this is not necessarily
167 // the same as compositor_task_runner_) because the AutoOpenCloseEvent
168 // functions must be calle don the same thread where the AutoOpenCloseEvent
169 // itself is constructed.
170 base::trace_event::AutoOpenCloseEvent* auto_open_close_;
benjhayden 2016/10/12 20:41:10 std::unique_ptr<AOCE> aoce_;
alexandermont 2016/10/13 19:15:53 Done
171 scoped_refptr<base::SingleThreadTaskRunner> constructor_task_runner_;
172
163 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor); 173 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor);
164 }; 174 };
165 175
166 } // namespace media 176 } // namespace media
167 177
168 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ 178 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698