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_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 const char* allowed_extensions, | 126 const char* allowed_extensions, |
127 const WebGraphicsContext3D::Attributes& attributes, | 127 const WebGraphicsContext3D::Attributes& attributes, |
128 bool bind_generates_resources, | 128 bool bind_generates_resources, |
129 const GURL& active_url, | 129 const GURL& active_url, |
130 content::CauseForGpuLaunch cause); | 130 content::CauseForGpuLaunch cause); |
131 | 131 |
132 // Create & initialize a WebGraphicsContext3DCommandBufferImpl. Return NULL | 132 // Create & initialize a WebGraphicsContext3DCommandBufferImpl. Return NULL |
133 // on any failure. | 133 // on any failure. |
134 static WebGraphicsContext3DCommandBufferImpl* CreateOffscreenContext( | 134 static WebGraphicsContext3DCommandBufferImpl* CreateOffscreenContext( |
135 GpuChannelHostFactory* factory, | 135 GpuChannelHostFactory* factory, |
136 const WebGraphicsContext3D::Attributes& attributes); | 136 const WebGraphicsContext3D::Attributes& attributes, |
| 137 const GURL& active_url); |
137 | 138 |
138 //---------------------------------------------------------------------- | 139 //---------------------------------------------------------------------- |
139 // WebGraphicsContext3D methods | 140 // WebGraphicsContext3D methods |
140 | 141 |
141 // Must be called after initialize() and before any of the following methods. | 142 // Must be called after initialize() and before any of the following methods. |
142 // Permanently binds to the first calling thread. Returns false if the | 143 // Permanently binds to the first calling thread. Returns false if the |
143 // graphics context fails to create. Do not call from more than one thread. | 144 // graphics context fails to create. Do not call from more than one thread. |
144 virtual bool makeContextCurrent(); | 145 virtual bool makeContextCurrent(); |
145 | 146 |
146 virtual int width(); | 147 virtual int width(); |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 CommandBufferProxy* command_buffer_; | 701 CommandBufferProxy* command_buffer_; |
701 gpu::gles2::GLES2CmdHelper* gles2_helper_; | 702 gpu::gles2::GLES2CmdHelper* gles2_helper_; |
702 gpu::TransferBuffer* transfer_buffer_; | 703 gpu::TransferBuffer* transfer_buffer_; |
703 gpu::gles2::GLES2Implementation* gl_; | 704 gpu::gles2::GLES2Implementation* gl_; |
704 Error last_error_; | 705 Error last_error_; |
705 int frame_number_; | 706 int frame_number_; |
706 bool bind_generates_resources_; | 707 bool bind_generates_resources_; |
707 }; | 708 }; |
708 | 709 |
709 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 710 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |