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 #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 |
11 #include <GLES2/gl2ext.h> | 11 #include <GLES2/gl2ext.h> |
12 #include <GLES2/gl2extchromium.h> | 12 #include <GLES2/gl2extchromium.h> |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/atomicops.h" | 16 #include "base/atomicops.h" |
17 #include "base/bind.h" | 17 #include "base/bind.h" |
18 #include "base/bind_helpers.h" | 18 #include "base/bind_helpers.h" |
19 #include "base/callback.h" | 19 #include "base/callback.h" |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "gpu/command_buffer/client/gles2_implementation.h" | 21 #include "gpu/command_buffer/client/gles2_implementation.h" |
22 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 22 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
23 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 23 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
24 #include "ui/gfx/geometry/size.h" | 24 #include "ui/gfx/geometry/size.h" |
25 #include "ui/gl/gl_implementation.h" | 25 #include "ui/gl/gl_implementation.h" |
26 | 26 |
| 27 using blink::WGC3Denum; |
27 using gpu::gles2::GLES2Implementation; | 28 using gpu::gles2::GLES2Implementation; |
28 using gpu::GLInProcessContext; | 29 using gpu::GLInProcessContext; |
29 | 30 |
30 namespace gpu_blink { | 31 namespace gpu_blink { |
31 | 32 |
32 // static | 33 // static |
33 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> | 34 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> |
34 WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( | 35 WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( |
35 const blink::WebGraphicsContext3D::Attributes& attributes, | 36 const blink::WebGraphicsContext3D::Attributes& attributes, |
36 bool lose_context_when_out_of_memory, | 37 bool lose_context_when_out_of_memory, |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 174 |
174 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { | 175 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { |
175 // TODO(kbr): improve the precision here. | 176 // TODO(kbr): improve the precision here. |
176 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 177 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
177 if (context_lost_callback_) { | 178 if (context_lost_callback_) { |
178 context_lost_callback_->onContextLost(); | 179 context_lost_callback_->onContextLost(); |
179 } | 180 } |
180 } | 181 } |
181 | 182 |
182 } // namespace gpu_blink | 183 } // namespace gpu_blink |
OLD | NEW |