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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 // Delete |texture_id|. | 133 // Delete |texture_id|. |
134 void DeleteTexture(uint32_t texture_id); | 134 void DeleteTexture(uint32_t texture_id); |
135 | 135 |
136 // Get the platform specific handle to the OpenGL display. | 136 // Get the platform specific handle to the OpenGL display. |
137 void* GetGLDisplay(); | 137 void* GetGLDisplay(); |
138 | 138 |
139 // Get the GL context. | 139 // Get the GL context. |
140 gl::GLContext* GetGLContext(); | 140 gl::GLContext* GetGLContext(); |
141 | 141 |
142 // Get rendered thumbnails as RGBA. | 142 // Get rendered thumbnails as RGB. |
143 void GetThumbnailsAsRGBA(std::vector<unsigned char>* rgba, | 143 // Sets alpha_solid to true if the alpha channel is entirely 0xff. |
144 base::WaitableEvent* done); | 144 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, |
| 145 bool* alpha_solid, |
| 146 base::WaitableEvent* done); |
145 | 147 |
146 private: | 148 private: |
147 struct RenderedVideo { | 149 struct RenderedVideo { |
148 // The rect on the screen where the video will be rendered. | 150 // The rect on the screen where the video will be rendered. |
149 gfx::Rect render_area; | 151 gfx::Rect render_area; |
150 | 152 |
151 // True if there won't be any new video frames comming. | 153 // True if there won't be any new video frames comming. |
152 bool is_flushing; | 154 bool is_flushing; |
153 | 155 |
154 // The number of frames need to be dropped to catch up the rendering. We | 156 // The number of frames need to be dropped to catch up the rendering. We |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 base::CancelableClosure render_task_; | 222 base::CancelableClosure render_task_; |
221 base::TimeTicks vsync_timebase_; | 223 base::TimeTicks vsync_timebase_; |
222 base::TimeDelta vsync_interval_; | 224 base::TimeDelta vsync_interval_; |
223 | 225 |
224 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 226 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
225 }; | 227 }; |
226 | 228 |
227 } // namespace media | 229 } // namespace media |
228 | 230 |
229 #endif // MEDIA_GPU_RENDERING_HELPER_H_ | 231 #endif // MEDIA_GPU_RENDERING_HELPER_H_ |
OLD | NEW |