| 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 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 5 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #ifndef GL_GLEXT_PROTOTYPES | 8 #ifndef GL_GLEXT_PROTOTYPES |
| 9 #define GL_GLEXT_PROTOTYPES 1 | 9 #define GL_GLEXT_PROTOTYPES 1 |
| 10 #endif | 10 #endif |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 WebGraphicsContext3DInProcessCommandBufferImpl:: | 100 WebGraphicsContext3DInProcessCommandBufferImpl:: |
| 101 WebGraphicsContext3DInProcessCommandBufferImpl( | 101 WebGraphicsContext3DInProcessCommandBufferImpl( |
| 102 scoped_ptr< ::gpu::GLInProcessContext> context, | 102 scoped_ptr< ::gpu::GLInProcessContext> context, |
| 103 const blink::WebGraphicsContext3D::Attributes& attributes, | 103 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 104 bool lose_context_when_out_of_memory, | 104 bool lose_context_when_out_of_memory, |
| 105 bool is_offscreen, | 105 bool is_offscreen, |
| 106 gfx::AcceleratedWidget window) | 106 gfx::AcceleratedWidget window) |
| 107 : share_resources_(attributes.shareResources), | 107 : share_resources_(attributes.shareResources), |
| 108 webgl_context_(attributes.noExtensions), | 108 webgl_context_(attributes.webGL), |
| 109 is_offscreen_(is_offscreen), | 109 is_offscreen_(is_offscreen), |
| 110 window_(window), | 110 window_(window), |
| 111 context_(context.Pass()) { | 111 context_(context.Pass()) { |
| 112 ConvertAttributes(attributes, &attribs_); | 112 ConvertAttributes(attributes, &attribs_); |
| 113 attribs_.lose_context_when_out_of_memory = lose_context_when_out_of_memory; | 113 attribs_.lose_context_when_out_of_memory = lose_context_when_out_of_memory; |
| 114 } | 114 } |
| 115 | 115 |
| 116 WebGraphicsContext3DInProcessCommandBufferImpl:: | 116 WebGraphicsContext3DInProcessCommandBufferImpl:: |
| 117 ~WebGraphicsContext3DInProcessCommandBufferImpl() { | 117 ~WebGraphicsContext3DInProcessCommandBufferImpl() { |
| 118 } | 118 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { | 201 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { |
| 202 // TODO(kbr): improve the precision here. | 202 // TODO(kbr): improve the precision here. |
| 203 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 203 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
| 204 if (context_lost_callback_) { | 204 if (context_lost_callback_) { |
| 205 context_lost_callback_->onContextLost(); | 205 context_lost_callback_->onContextLost(); |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace gpu | 209 } // namespace gpu |
| 210 } // namespace webkit | 210 } // namespace webkit |
| OLD | NEW |