| 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 "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" | 5 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #ifndef GL_GLEXT_PROTOTYPES | 9 #ifndef GL_GLEXT_PROTOTYPES |
| 10 #define GL_GLEXT_PROTOTYPES 1 | 10 #define GL_GLEXT_PROTOTYPES 1 |
| 11 #endif | 11 #endif |
| 12 #include <GLES2/gl2ext.h> | 12 #include <GLES2/gl2ext.h> |
| 13 #include <GLES2/gl2extchromium.h> | 13 #include <GLES2/gl2extchromium.h> |
| 14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 | 15 |
| 16 #include <string> | 16 #include <string> |
| 17 | 17 |
| 18 #include "base/atomicops.h" | 18 #include "base/atomicops.h" |
| 19 #include "base/bind.h" | 19 #include "base/bind.h" |
| 20 #include "base/bind_helpers.h" | 20 #include "base/bind_helpers.h" |
| 21 #include "base/callback.h" | 21 #include "base/callback.h" |
| 22 #include "base/logging.h" | 22 #include "base/logging.h" |
| 23 #include "gpu/command_buffer/client/gles2_implementation.h" | 23 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 24 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 24 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 25 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 25 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
| 26 #include "ui/gfx/geometry/size.h" | 26 #include "ui/gfx/geometry/size.h" |
| 27 #include "ui/gl/gl_implementation.h" | 27 #include "ui/gl/gl_implementation.h" |
| 28 | 28 |
| 29 using blink::WGC3Denum; | |
| 30 using gpu::gles2::GLES2Implementation; | 29 using gpu::gles2::GLES2Implementation; |
| 31 using gpu::GLInProcessContext; | 30 using gpu::GLInProcessContext; |
| 32 | 31 |
| 33 namespace gpu_blink { | 32 namespace gpu_blink { |
| 34 | 33 |
| 35 // static | 34 // static |
| 36 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> | 35 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> |
| 37 WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( | 36 WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( |
| 38 const blink::WebGraphicsContext3D::Attributes& attributes, | 37 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 39 bool lose_context_when_out_of_memory, | 38 bool lose_context_when_out_of_memory, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 return real_gl_; | 162 return real_gl_; |
| 164 } | 163 } |
| 165 | 164 |
| 166 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { | 165 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { |
| 167 if (context_lost_callback_) { | 166 if (context_lost_callback_) { |
| 168 context_lost_callback_->onContextLost(); | 167 context_lost_callback_->onContextLost(); |
| 169 } | 168 } |
| 170 } | 169 } |
| 171 | 170 |
| 172 } // namespace gpu_blink | 171 } // namespace gpu_blink |
| OLD | NEW |