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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 // Render |texture_id| to the screen using target |texture_target|. | 72 // Render |texture_id| to the screen using target |texture_target|. |
73 void RenderTexture(uint32 texture_target, uint32 texture_id); | 73 void RenderTexture(uint32 texture_target, uint32 texture_id); |
74 | 74 |
75 // Delete |texture_id|. | 75 // Delete |texture_id|. |
76 void DeleteTexture(uint32 texture_id); | 76 void DeleteTexture(uint32 texture_id); |
77 | 77 |
78 // Get the platform specific handle to the OpenGL display. | 78 // Get the platform specific handle to the OpenGL display. |
79 void* GetGLDisplay(); | 79 void* GetGLDisplay(); |
80 | 80 |
| 81 // Get the platform specific handle to the OpenGL context. |
| 82 NativeContextType GetGLContext(); |
| 83 |
81 // Get rendered thumbnails as RGB. | 84 // Get rendered thumbnails as RGB. |
82 // Sets alpha_solid to true if the alpha channel is entirely 0xff. | 85 // Sets alpha_solid to true if the alpha channel is entirely 0xff. |
83 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, | 86 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, |
84 bool* alpha_solid, | 87 bool* alpha_solid, |
85 base::WaitableEvent* done); | 88 base::WaitableEvent* done); |
86 | 89 |
87 private: | 90 private: |
88 void Clear(); | 91 void Clear(); |
89 | 92 |
90 // Make window_id's surface current w/ the GL context, or release the context | 93 // Make window_id's surface current w/ the GL context, or release the context |
(...skipping 28 matching lines...) Expand all Loading... |
119 gfx::Size thumbnails_fbo_size_; | 122 gfx::Size thumbnails_fbo_size_; |
120 gfx::Size thumbnail_size_; | 123 gfx::Size thumbnail_size_; |
121 GLuint program_; | 124 GLuint program_; |
122 | 125 |
123 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 126 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
124 }; | 127 }; |
125 | 128 |
126 } // namespace content | 129 } // namespace content |
127 | 130 |
128 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 131 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
OLD | NEW |