Chromium Code Reviews| 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 RGB. | 142 // Get rendered thumbnails as RGB. |
|
scroggo_chromium
2017/06/13 14:54:00
RGB -> RGBA
msarett1
2017/06/13 16:32:03
Done.
| |
| 143 // Sets alpha_solid to true if the alpha channel is entirely 0xff. | 143 // Sets alpha_solid to true if the alpha channel is entirely 0xff. |
| 144 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, | 144 void GetThumbnailsAsRGBA(std::vector<unsigned char>* rgba, |
| 145 bool* alpha_solid, | 145 bool* alpha_solid, |
| 146 base::WaitableEvent* done); | 146 base::WaitableEvent* done); |
| 147 | 147 |
| 148 private: | 148 private: |
| 149 struct RenderedVideo { | 149 struct RenderedVideo { |
| 150 // The rect on the screen where the video will be rendered. | 150 // The rect on the screen where the video will be rendered. |
| 151 gfx::Rect render_area; | 151 gfx::Rect render_area; |
| 152 | 152 |
| 153 // True if there won't be any new video frames comming. | 153 // True if there won't be any new video frames comming. |
| 154 bool is_flushing; | 154 bool is_flushing; |
| 155 | 155 |
| 156 // 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... | |
| 222 base::CancelableClosure render_task_; | 222 base::CancelableClosure render_task_; |
| 223 base::TimeTicks vsync_timebase_; | 223 base::TimeTicks vsync_timebase_; |
| 224 base::TimeDelta vsync_interval_; | 224 base::TimeDelta vsync_interval_; |
| 225 | 225 |
| 226 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 226 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 } // namespace media | 229 } // namespace media |
| 230 | 230 |
| 231 #endif // MEDIA_GPU_RENDERING_HELPER_H_ | 231 #endif // MEDIA_GPU_RENDERING_HELPER_H_ |
| OLD | NEW |