| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 gpu::CommandBufferProxyImpl* GetCommandBufferProxy() { | 124 gpu::CommandBufferProxyImpl* GetCommandBufferProxy() { |
| 125 return command_buffer_.get(); | 125 return command_buffer_.get(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 CONTENT_EXPORT gpu::ContextSupport* GetContextSupport(); | 128 CONTENT_EXPORT gpu::ContextSupport* GetContextSupport(); |
| 129 | 129 |
| 130 gpu::gles2::GLES2Implementation* GetImplementation() { | 130 gpu::gles2::GLES2Implementation* GetImplementation() { |
| 131 return real_gl_.get(); | 131 return real_gl_.get(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 // Return true if GPU process reported context lost or there was a | |
| 135 // problem communicating with the GPU process. | |
| 136 bool IsCommandBufferContextLost(); | |
| 137 | |
| 138 // Create & initialize a WebGraphicsContext3DCommandBufferImpl. Return NULL | 134 // Create & initialize a WebGraphicsContext3DCommandBufferImpl. Return NULL |
| 139 // on any failure. | 135 // on any failure. |
| 140 static CONTENT_EXPORT WebGraphicsContext3DCommandBufferImpl* | 136 static CONTENT_EXPORT WebGraphicsContext3DCommandBufferImpl* |
| 141 CreateOffscreenContext( | 137 CreateOffscreenContext( |
| 142 gpu::GpuChannelHost* host, | 138 gpu::GpuChannelHost* host, |
| 143 const gpu::gles2::ContextCreationAttribHelper& attributes, | 139 const gpu::gles2::ContextCreationAttribHelper& attributes, |
| 144 gfx::GpuPreference gpu_preference, | 140 gfx::GpuPreference gpu_preference, |
| 145 bool share_resources, | 141 bool share_resources, |
| 146 bool automatic_flushes, | 142 bool automatic_flushes, |
| 147 const GURL& active_url, | 143 const GURL& active_url, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 211 |
| 216 // Member variables should appear before the WeakPtrFactory, to ensure | 212 // Member variables should appear before the WeakPtrFactory, to ensure |
| 217 // that any WeakPtrs to Controller are invalidated before its members | 213 // that any WeakPtrs to Controller are invalidated before its members |
| 218 // variable's destructors are executed, rendering them invalid. | 214 // variable's destructors are executed, rendering them invalid. |
| 219 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; | 215 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; |
| 220 }; | 216 }; |
| 221 | 217 |
| 222 } // namespace content | 218 } // namespace content |
| 223 | 219 |
| 224 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 220 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |