| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Flushes the pending frames. Notify the rendering_helper there won't be | 107 // Flushes the pending frames. Notify the rendering_helper there won't be |
| 108 // more video frames. | 108 // more video frames. |
| 109 void Flush(size_t window_id); | 109 void Flush(size_t window_id); |
| 110 | 110 |
| 111 // Delete |texture_id|. | 111 // Delete |texture_id|. |
| 112 void DeleteTexture(uint32 texture_id); | 112 void DeleteTexture(uint32 texture_id); |
| 113 | 113 |
| 114 // Get the platform specific handle to the OpenGL display. | 114 // Get the platform specific handle to the OpenGL display. |
| 115 void* GetGLDisplay(); | 115 void* GetGLDisplay(); |
| 116 | 116 |
| 117 // Get the GL context. |
| 118 scoped_refptr<gfx::GLContext> GetGLContext(); |
| 119 |
| 117 // Get the platform specific handle to the OpenGL context. | 120 // Get the platform specific handle to the OpenGL context. |
| 118 void* GetGLContext(); | 121 void* GetGLContextHandle(); |
| 119 | 122 |
| 120 // Get rendered thumbnails as RGB. | 123 // Get rendered thumbnails as RGB. |
| 121 // Sets alpha_solid to true if the alpha channel is entirely 0xff. | 124 // Sets alpha_solid to true if the alpha channel is entirely 0xff. |
| 122 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, | 125 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, |
| 123 bool* alpha_solid, | 126 bool* alpha_solid, |
| 124 base::WaitableEvent* done); | 127 base::WaitableEvent* done); |
| 125 | 128 |
| 126 private: | 129 private: |
| 127 struct RenderedVideo { | 130 struct RenderedVideo { |
| 128 // The rect on the screen where the video will be rendered. | 131 // The rect on the screen where the video will be rendered. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 base::CancelableClosure render_task_; | 190 base::CancelableClosure render_task_; |
| 188 base::TimeTicks vsync_timebase_; | 191 base::TimeTicks vsync_timebase_; |
| 189 base::TimeDelta vsync_interval_; | 192 base::TimeDelta vsync_interval_; |
| 190 | 193 |
| 191 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 194 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
| 192 }; | 195 }; |
| 193 | 196 |
| 194 } // namespace content | 197 } // namespace content |
| 195 | 198 |
| 196 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 199 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
| OLD | NEW |