| 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 MEDIA_GPU_RENDERING_HELPER_H_ | 5 #ifndef MEDIA_GPU_RENDERING_HELPER_H_ |
| 6 #define MEDIA_GPU_RENDERING_HELPER_H_ | 6 #define MEDIA_GPU_RENDERING_HELPER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // more video frames. | 129 // more video frames. |
| 130 void Flush(size_t window_id); | 130 void Flush(size_t window_id); |
| 131 | 131 |
| 132 // Delete |texture_id|. | 132 // Delete |texture_id|. |
| 133 void DeleteTexture(uint32_t texture_id); | 133 void DeleteTexture(uint32_t texture_id); |
| 134 | 134 |
| 135 // Get the platform specific handle to the OpenGL display. | 135 // Get the platform specific handle to the OpenGL display. |
| 136 void* GetGLDisplay(); | 136 void* GetGLDisplay(); |
| 137 | 137 |
| 138 // Get the GL context. | 138 // Get the GL context. |
| 139 gfx::GLContext* GetGLContext(); | 139 gl::GLContext* GetGLContext(); |
| 140 | 140 |
| 141 // Get rendered thumbnails as RGB. | 141 // Get rendered thumbnails as RGB. |
| 142 // Sets alpha_solid to true if the alpha channel is entirely 0xff. | 142 // Sets alpha_solid to true if the alpha channel is entirely 0xff. |
| 143 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, | 143 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, |
| 144 bool* alpha_solid, | 144 bool* alpha_solid, |
| 145 base::WaitableEvent* done); | 145 base::WaitableEvent* done); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 struct RenderedVideo { | 148 struct RenderedVideo { |
| 149 // The rect on the screen where the video will be rendered. | 149 // The rect on the screen where the video will be rendered. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 void DropOneFrameForAllVideos(); | 182 void DropOneFrameForAllVideos(); |
| 183 void ScheduleNextRenderContent(); | 183 void ScheduleNextRenderContent(); |
| 184 | 184 |
| 185 // Render |texture_id| to the current view port of the screen using target | 185 // Render |texture_id| to the current view port of the screen using target |
| 186 // |texture_target|. | 186 // |texture_target|. |
| 187 void RenderTexture(uint32_t texture_target, uint32_t texture_id); | 187 void RenderTexture(uint32_t texture_target, uint32_t texture_id); |
| 188 | 188 |
| 189 base::MessageLoop* message_loop_; | 189 base::MessageLoop* message_loop_; |
| 190 | 190 |
| 191 scoped_refptr<gfx::GLContext> gl_context_; | 191 scoped_refptr<gl::GLContext> gl_context_; |
| 192 scoped_refptr<gfx::GLSurface> gl_surface_; | 192 scoped_refptr<gl::GLSurface> gl_surface_; |
| 193 | 193 |
| 194 #if defined(USE_OZONE) | 194 #if defined(USE_OZONE) |
| 195 class StubOzoneDelegate; | 195 class StubOzoneDelegate; |
| 196 std::unique_ptr<StubOzoneDelegate> platform_window_delegate_; | 196 std::unique_ptr<StubOzoneDelegate> platform_window_delegate_; |
| 197 | 197 |
| 198 #if defined(OS_CHROMEOS) | 198 #if defined(OS_CHROMEOS) |
| 199 std::unique_ptr<ui::DisplayConfigurator> display_configurator_; | 199 std::unique_ptr<ui::DisplayConfigurator> display_configurator_; |
| 200 #endif | 200 #endif |
| 201 #endif | 201 #endif |
| 202 | 202 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 220 base::CancelableClosure render_task_; | 220 base::CancelableClosure render_task_; |
| 221 base::TimeTicks vsync_timebase_; | 221 base::TimeTicks vsync_timebase_; |
| 222 base::TimeDelta vsync_interval_; | 222 base::TimeDelta vsync_interval_; |
| 223 | 223 |
| 224 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 224 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 } // namespace media | 227 } // namespace media |
| 228 | 228 |
| 229 #endif // MEDIA_GPU_RENDERING_HELPER_H_ | 229 #endif // MEDIA_GPU_RENDERING_HELPER_H_ |
| OLD | NEW |