| 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 <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class MessageLoop; | 22 class MessageLoop; |
| 23 class WaitableEvent; | 23 class WaitableEvent; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace ui { | 26 namespace ui { |
| 27 class DisplayConfigurator; | 27 class DisplayConfigurator; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace content { | 30 namespace content { |
| 31 | 31 |
| 32 class GlRenderer; |
| 33 |
| 32 class VideoFrameTexture : public base::RefCounted<VideoFrameTexture> { | 34 class VideoFrameTexture : public base::RefCounted<VideoFrameTexture> { |
| 33 public: | 35 public: |
| 34 uint32 texture_id() const { return texture_id_; } | 36 uint32 texture_id() const { return texture_id_; } |
| 35 uint32 texture_target() const { return texture_target_; } | 37 uint32 texture_target() const { return texture_target_; } |
| 36 | 38 |
| 37 VideoFrameTexture(uint32 texture_target, | 39 VideoFrameTexture(uint32 texture_target, |
| 38 uint32 texture_id, | 40 uint32 texture_id, |
| 39 const base::Closure& no_longer_needed_cb); | 41 const base::Closure& no_longer_needed_cb); |
| 40 | 42 |
| 41 private: | 43 private: |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 180 |
| 179 void DropOneFrameForAllVideos(); | 181 void DropOneFrameForAllVideos(); |
| 180 void ScheduleNextRenderContent(); | 182 void ScheduleNextRenderContent(); |
| 181 | 183 |
| 182 // Render |texture_id| to the current view port of the screen using target | 184 // Render |texture_id| to the current view port of the screen using target |
| 183 // |texture_target|. | 185 // |texture_target|. |
| 184 void RenderTexture(uint32 texture_target, uint32 texture_id); | 186 void RenderTexture(uint32 texture_target, uint32 texture_id); |
| 185 | 187 |
| 186 base::MessageLoop* message_loop_; | 188 base::MessageLoop* message_loop_; |
| 187 | 189 |
| 188 scoped_refptr<gfx::GLContext> gl_context_; | 190 scoped_ptr<GlRenderer> gl_renderer_; |
| 189 scoped_refptr<gfx::GLSurface> gl_surface_; | |
| 190 | 191 |
| 191 #if defined(USE_OZONE) | 192 #if defined(USE_OZONE) |
| 192 class StubOzoneDelegate; | 193 class StubOzoneDelegate; |
| 193 scoped_ptr<StubOzoneDelegate> platform_window_delegate_; | 194 scoped_ptr<StubOzoneDelegate> platform_window_delegate_; |
| 194 | 195 |
| 195 #if defined(OS_CHROMEOS) | 196 #if defined(OS_CHROMEOS) |
| 196 scoped_ptr<ui::DisplayConfigurator> display_configurator_; | 197 scoped_ptr<ui::DisplayConfigurator> display_configurator_; |
| 197 #endif | 198 #endif |
| 198 #endif | 199 #endif |
| 199 | 200 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 215 base::CancelableClosure render_task_; | 216 base::CancelableClosure render_task_; |
| 216 base::TimeTicks vsync_timebase_; | 217 base::TimeTicks vsync_timebase_; |
| 217 base::TimeDelta vsync_interval_; | 218 base::TimeDelta vsync_interval_; |
| 218 | 219 |
| 219 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 220 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
| 220 }; | 221 }; |
| 221 | 222 |
| 222 } // namespace content | 223 } // namespace content |
| 223 | 224 |
| 224 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 225 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
| OLD | NEW |