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 |
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/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 gpu::gles2::GLES2Implementation; | 27 using gpu::gles2::GLES2Implementation; |
28 using gpu::GLInProcessContext; | 28 using gpu::GLInProcessContext; |
29 | 29 |
30 namespace webkit { | 30 namespace webkit { |
31 namespace gpu { | 31 namespace gpu { |
32 | 32 |
33 // static | 33 // static |
34 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> | 34 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { | 171 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { |
172 // TODO(kbr): improve the precision here. | 172 // TODO(kbr): improve the precision here. |
173 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 173 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
174 if (context_lost_callback_) { | 174 if (context_lost_callback_) { |
175 context_lost_callback_->onContextLost(); | 175 context_lost_callback_->onContextLost(); |
176 } | 176 } |
177 } | 177 } |
178 | 178 |
179 } // namespace gpu | 179 } // namespace gpu |
180 } // namespace webkit | 180 } // namespace webkit |
OLD | NEW |