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 | |
120 // Get the platform specific handle to the OpenGL context. | 117 // Get the platform specific handle to the OpenGL context. |
121 void* GetGLContextHandle(); | 118 void* GetGLContext(); |
122 | 119 |
123 // Get rendered thumbnails as RGB. | 120 // Get rendered thumbnails as RGB. |
124 // Sets alpha_solid to true if the alpha channel is entirely 0xff. | 121 // Sets alpha_solid to true if the alpha channel is entirely 0xff. |
125 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, | 122 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, |
126 bool* alpha_solid, | 123 bool* alpha_solid, |
127 base::WaitableEvent* done); | 124 base::WaitableEvent* done); |
128 | 125 |
129 private: | 126 private: |
130 struct RenderedVideo { | 127 struct RenderedVideo { |
131 // The rect on the screen where the video will be rendered. | 128 // The rect on the screen where the video will be rendered. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 base::CancelableClosure render_task_; | 187 base::CancelableClosure render_task_; |
191 base::TimeTicks vsync_timebase_; | 188 base::TimeTicks vsync_timebase_; |
192 base::TimeDelta vsync_interval_; | 189 base::TimeDelta vsync_interval_; |
193 | 190 |
194 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 191 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
195 }; | 192 }; |
196 | 193 |
197 } // namespace content | 194 } // namespace content |
198 | 195 |
199 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 196 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
OLD | NEW |