OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This API is consistent with other OpenGL setup APIs like window's WGL | 5 // This API is consistent with other OpenGL setup APIs like window's WGL |
6 // and pepper's PGL. This API is used to manage OpenGL RendererGLContexts in the | 6 // and pepper's PGL. This API is used to manage OpenGL RendererGLContexts in the |
7 // Chrome renderer process in a way that is consistent with other platforms. | 7 // Chrome renderer process in a way that is consistent with other platforms. |
8 | 8 |
9 #ifndef CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ | 9 #ifndef CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ |
10 #define CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ | 10 #define CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 CommandBufferProxy* GetCommandBufferProxy(); | 188 CommandBufferProxy* GetCommandBufferProxy(); |
189 | 189 |
190 private: | 190 private: |
191 explicit RendererGLContext(GpuChannelHost* channel); | 191 explicit RendererGLContext(GpuChannelHost* channel); |
192 | 192 |
193 bool Initialize(bool onscreen, | 193 bool Initialize(bool onscreen, |
194 int render_view_id, | 194 int render_view_id, |
195 const gfx::Size& size, | 195 const gfx::Size& size, |
196 bool share_resources, | 196 bool share_resources, |
| 197 bool bind_generates_resource, |
197 RendererGLContext* share_group, | 198 RendererGLContext* share_group, |
198 const char* allowed_extensions, | 199 const char* allowed_extensions, |
199 const int32* attrib_list, | 200 const int32* attrib_list, |
200 const GURL& active_url); | 201 const GURL& active_url); |
201 void Destroy(); | 202 void Destroy(); |
202 | 203 |
203 void OnSwapBuffers(); | 204 void OnSwapBuffers(); |
204 void OnContextLost(); | 205 void OnContextLost(); |
205 | 206 |
206 scoped_refptr<GpuChannelHost> channel_; | 207 scoped_refptr<GpuChannelHost> channel_; |
207 base::WeakPtr<RendererGLContext> parent_; | 208 base::WeakPtr<RendererGLContext> parent_; |
208 scoped_ptr<Callback0::Type> swap_buffers_callback_; | 209 scoped_ptr<Callback0::Type> swap_buffers_callback_; |
209 scoped_ptr<Callback1<ContextLostReason>::Type> context_lost_callback_; | 210 scoped_ptr<Callback1<ContextLostReason>::Type> context_lost_callback_; |
210 uint32 parent_texture_id_; | 211 uint32 parent_texture_id_; |
211 CommandBufferProxy* command_buffer_; | 212 CommandBufferProxy* command_buffer_; |
212 gpu::gles2::GLES2CmdHelper* gles2_helper_; | 213 gpu::gles2::GLES2CmdHelper* gles2_helper_; |
213 int32 transfer_buffer_id_; | 214 int32 transfer_buffer_id_; |
214 gpu::gles2::GLES2Implementation* gles2_implementation_; | 215 gpu::gles2::GLES2Implementation* gles2_implementation_; |
215 gfx::Size size_; | 216 gfx::Size size_; |
216 Error last_error_; | 217 Error last_error_; |
217 int frame_number_; | 218 int frame_number_; |
218 | 219 |
219 DISALLOW_COPY_AND_ASSIGN(RendererGLContext); | 220 DISALLOW_COPY_AND_ASSIGN(RendererGLContext); |
220 }; | 221 }; |
221 | 222 |
222 #endif // CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ | 223 #endif // CONTENT_RENDERER_GPU_RENDERER_GL_CONTEXT_H_ |
OLD | NEW |