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_impl.h" | 5 #include "gpu/blink/webgraphicscontext3d_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
14 #include "gpu/GLES2/gl2extchromium.h" | 14 #include "gpu/GLES2/gl2extchromium.h" |
15 #include "gpu/command_buffer/client/gles2_implementation.h" | 15 #include "gpu/command_buffer/client/gles2_implementation.h" |
16 #include "gpu/command_buffer/client/gles2_lib.h" | 16 #include "gpu/command_buffer/client/gles2_lib.h" |
17 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 17 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
18 #include "gpu/command_buffer/common/sync_token.h" | 18 #include "gpu/command_buffer/common/sync_token.h" |
19 | 19 |
20 #include "third_party/khronos/GLES2/gl2.h" | 20 #include "third_party/khronos/GLES2/gl2.h" |
21 #ifndef GL_GLEXT_PROTOTYPES | 21 #ifndef GL_GLEXT_PROTOTYPES |
22 #define GL_GLEXT_PROTOTYPES 1 | 22 #define GL_GLEXT_PROTOTYPES 1 |
23 #endif | 23 #endif |
24 #include "third_party/khronos/GLES2/gl2ext.h" | 24 #include "third_party/khronos/GLES2/gl2ext.h" |
25 | 25 |
26 using blink::WGC3Dbitfield; | |
27 using blink::WGC3Dboolean; | |
28 using blink::WGC3Dbyte; | |
29 using blink::WGC3Dchar; | |
30 using blink::WGC3Dclampf; | |
31 using blink::WGC3Denum; | |
32 using blink::WGC3Dfloat; | |
33 using blink::WGC3Dint; | |
34 using blink::WGC3Dintptr; | |
35 using blink::WGC3Dsizei; | |
36 using blink::WGC3Dsizeiptr; | |
37 using blink::WGC3Dint64; | |
38 using blink::WGC3Duint64; | |
39 using blink::WGC3Duint; | |
40 using blink::WebGLId; | |
41 | |
42 namespace gpu_blink { | 26 namespace gpu_blink { |
43 | 27 |
44 class WebGraphicsContext3DErrorMessageCallback | 28 class WebGraphicsContext3DErrorMessageCallback |
45 : public ::gpu::gles2::GLES2ImplementationErrorMessageCallback { | 29 : public ::gpu::gles2::GLES2ImplementationErrorMessageCallback { |
46 public: | 30 public: |
47 WebGraphicsContext3DErrorMessageCallback( | 31 WebGraphicsContext3DErrorMessageCallback( |
48 WebGraphicsContext3DImpl* context) | 32 WebGraphicsContext3DImpl* context) |
49 : graphics_context_(context) { | 33 : graphics_context_(context) { |
50 } | 34 } |
51 | 35 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; | 121 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; |
138 break; | 122 break; |
139 default: | 123 default: |
140 NOTREACHED(); | 124 NOTREACHED(); |
141 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; | 125 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; |
142 break; | 126 break; |
143 } | 127 } |
144 } | 128 } |
145 | 129 |
146 } // namespace gpu_blink | 130 } // namespace gpu_blink |
OLD | NEW |