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 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // NOTE: on Mac OS X, this entry point is only used to set up the | 184 // NOTE: on Mac OS X, this entry point is only used to set up the |
185 // accelerated compositor's output. On this platform, we actually pass | 185 // accelerated compositor's output. On this platform, we actually pass |
186 // a gpu::SurfaceHandle in place of the gfx::NativeViewId, | 186 // a gpu::SurfaceHandle in place of the gfx::NativeViewId, |
187 // because the facility to allocate a fake PluginWindowHandle is | 187 // because the facility to allocate a fake PluginWindowHandle is |
188 // already in place. We could add more entry points and messages to | 188 // already in place. We could add more entry points and messages to |
189 // allocate both fake PluginWindowHandles and NativeViewIds and map | 189 // allocate both fake PluginWindowHandles and NativeViewIds and map |
190 // from fake NativeViewIds to PluginWindowHandles, but this seems like | 190 // from fake NativeViewIds to PluginWindowHandles, but this seems like |
191 // unnecessary complexity at the moment. | 191 // unnecessary complexity at the moment. |
192 bool CreateContext(); | 192 bool CreateContext(); |
193 | 193 |
194 virtual void OnContextLost(); | 194 void OnContextLost(); |
| 195 void OnErrorMessage(const char* message, int32_t id); |
195 | 196 |
196 bool automatic_flushes_; | 197 bool automatic_flushes_; |
197 gpu::gles2::ContextCreationAttribHelper attributes_; | 198 gpu::gles2::ContextCreationAttribHelper attributes_; |
198 | 199 |
199 // State needed by MaybeInitializeGL. | 200 // State needed by MaybeInitializeGL. |
200 scoped_refptr<gpu::GpuChannelHost> host_; | 201 scoped_refptr<gpu::GpuChannelHost> host_; |
201 gpu::SurfaceHandle surface_handle_; | 202 gpu::SurfaceHandle surface_handle_; |
202 GURL active_url_; | 203 GURL active_url_; |
203 CommandBufferContextType context_type_; | 204 CommandBufferContextType context_type_; |
204 | 205 |
205 gfx::GpuPreference gpu_preference_; | 206 gfx::GpuPreference gpu_preference_; |
206 | 207 |
207 scoped_ptr<gpu::CommandBufferProxyImpl> command_buffer_; | 208 scoped_ptr<gpu::CommandBufferProxyImpl> command_buffer_; |
208 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; | 209 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; |
209 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; | 210 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; |
210 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_; | 211 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_; |
211 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_; | 212 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_; |
212 SharedMemoryLimits mem_limits_; | 213 SharedMemoryLimits mem_limits_; |
213 scoped_refptr<ShareGroup> share_group_; | 214 scoped_refptr<ShareGroup> share_group_; |
214 | 215 |
215 // Member variables should appear before the WeakPtrFactory, to ensure | 216 // Member variables should appear before the WeakPtrFactory, to ensure |
216 // that any WeakPtrs to Controller are invalidated before its members | 217 // that any WeakPtrs to Controller are invalidated before its members |
217 // variable's destructors are executed, rendering them invalid. | 218 // variable's destructors are executed, rendering them invalid. |
218 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; | 219 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; |
219 }; | 220 }; |
220 | 221 |
221 } // namespace content | 222 } // namespace content |
222 | 223 |
223 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 224 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |