OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 uint32_t texture_target_; | 48 uint32_t texture_target_; |
49 uint32_t texture_id_; | 49 uint32_t texture_id_; |
50 base::Closure no_longer_needed_cb_; | 50 base::Closure no_longer_needed_cb_; |
51 | 51 |
52 ~VideoFrameTexture(); | 52 ~VideoFrameTexture(); |
53 }; | 53 }; |
54 | 54 |
55 struct RenderingHelperParams { | 55 struct RenderingHelperParams { |
56 RenderingHelperParams(); | 56 RenderingHelperParams(); |
| 57 RenderingHelperParams(const RenderingHelperParams& other); |
57 ~RenderingHelperParams(); | 58 ~RenderingHelperParams(); |
58 | 59 |
59 // The rendering FPS. | 60 // The rendering FPS. |
60 int rendering_fps; | 61 int rendering_fps; |
61 | 62 |
62 // The number of empty frames rendered when the rendering helper is | 63 // The number of empty frames rendered when the rendering helper is |
63 // initialized. | 64 // initialized. |
64 int warm_up_iterations; | 65 int warm_up_iterations; |
65 | 66 |
66 // The desired size of each window. We play each stream in its own window | 67 // The desired size of each window. We play each stream in its own window |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // always keep the last remaining frame in pending_frames even after it | 156 // always keep the last remaining frame in pending_frames even after it |
156 // has been rendered, so that we have something to display if the client | 157 // has been rendered, so that we have something to display if the client |
157 // is falling behind on providing us with new frames during timer-driven | 158 // is falling behind on providing us with new frames during timer-driven |
158 // playback. | 159 // playback. |
159 int frames_to_drop; | 160 int frames_to_drop; |
160 | 161 |
161 // The video frames pending for rendering. | 162 // The video frames pending for rendering. |
162 std::queue<scoped_refptr<VideoFrameTexture> > pending_frames; | 163 std::queue<scoped_refptr<VideoFrameTexture> > pending_frames; |
163 | 164 |
164 RenderedVideo(); | 165 RenderedVideo(); |
| 166 RenderedVideo(const RenderedVideo& other); |
165 ~RenderedVideo(); | 167 ~RenderedVideo(); |
166 }; | 168 }; |
167 | 169 |
168 void Clear(); | 170 void Clear(); |
169 | 171 |
170 void RenderContent(); | 172 void RenderContent(); |
171 | 173 |
172 void WarmUpRendering(int warm_up_iterations); | 174 void WarmUpRendering(int warm_up_iterations); |
173 | 175 |
174 void LayoutRenderingAreas(const std::vector<gfx::Size>& window_sizes); | 176 void LayoutRenderingAreas(const std::vector<gfx::Size>& window_sizes); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 base::CancelableClosure render_task_; | 220 base::CancelableClosure render_task_; |
219 base::TimeTicks vsync_timebase_; | 221 base::TimeTicks vsync_timebase_; |
220 base::TimeDelta vsync_interval_; | 222 base::TimeDelta vsync_interval_; |
221 | 223 |
222 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 224 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
223 }; | 225 }; |
224 | 226 |
225 } // namespace content | 227 } // namespace content |
226 | 228 |
227 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 229 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
OLD | NEW |