| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // more video frames. | 128 // more video frames. |
| 129 void Flush(size_t window_id); | 129 void Flush(size_t window_id); |
| 130 | 130 |
| 131 // Delete |texture_id|. | 131 // Delete |texture_id|. |
| 132 void DeleteTexture(uint32_t texture_id); | 132 void DeleteTexture(uint32_t texture_id); |
| 133 | 133 |
| 134 // Get the platform specific handle to the OpenGL display. | 134 // Get the platform specific handle to the OpenGL display. |
| 135 void* GetGLDisplay(); | 135 void* GetGLDisplay(); |
| 136 | 136 |
| 137 // Get the GL context. | 137 // Get the GL context. |
| 138 scoped_refptr<gfx::GLContext> GetGLContext(); | 138 gfx::GLContext* GetGLContext(); |
| 139 | |
| 140 // Get the platform specific handle to the OpenGL context. | |
| 141 void* GetGLContextHandle(); | |
| 142 | 139 |
| 143 // Get rendered thumbnails as RGB. | 140 // Get rendered thumbnails as RGB. |
| 144 // Sets alpha_solid to true if the alpha channel is entirely 0xff. | 141 // Sets alpha_solid to true if the alpha channel is entirely 0xff. |
| 145 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, | 142 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, |
| 146 bool* alpha_solid, | 143 bool* alpha_solid, |
| 147 base::WaitableEvent* done); | 144 base::WaitableEvent* done); |
| 148 | 145 |
| 149 private: | 146 private: |
| 150 struct RenderedVideo { | 147 struct RenderedVideo { |
| 151 // The rect on the screen where the video will be rendered. | 148 // The rect on the screen where the video will be rendered. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 base::CancelableClosure render_task_; | 218 base::CancelableClosure render_task_; |
| 222 base::TimeTicks vsync_timebase_; | 219 base::TimeTicks vsync_timebase_; |
| 223 base::TimeDelta vsync_interval_; | 220 base::TimeDelta vsync_interval_; |
| 224 | 221 |
| 225 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 222 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
| 226 }; | 223 }; |
| 227 | 224 |
| 228 } // namespace content | 225 } // namespace content |
| 229 | 226 |
| 230 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 227 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
| OLD | NEW |