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_impl.h" | 5 #include "webkit/common/gpu/webgraphicscontext3d_impl.h" |
6 | 6 |
7 #include "base/atomicops.h" | 7 #include "base/atomicops.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "gpu/GLES2/gl2extchromium.h" |
11 #include "gpu/command_buffer/client/gles2_implementation.h" | 11 #include "gpu/command_buffer/client/gles2_implementation.h" |
12 #include "gpu/command_buffer/client/gles2_lib.h" | 12 #include "gpu/command_buffer/client/gles2_lib.h" |
| 13 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
13 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 14 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
14 | 15 |
15 #include "third_party/khronos/GLES2/gl2.h" | 16 #include "third_party/khronos/GLES2/gl2.h" |
16 #ifndef GL_GLEXT_PROTOTYPES | 17 #ifndef GL_GLEXT_PROTOTYPES |
17 #define GL_GLEXT_PROTOTYPES 1 | 18 #define GL_GLEXT_PROTOTYPES 1 |
18 #endif | 19 #endif |
19 #include "third_party/khronos/GLES2/gl2ext.h" | 20 #include "third_party/khronos/GLES2/gl2ext.h" |
20 | 21 |
21 namespace webkit { | 22 namespace webkit { |
22 namespace gpu { | 23 namespace gpu { |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 } | 974 } |
974 | 975 |
975 void WebGraphicsContext3DImpl::copyTextureToParentTextureCHROMIUM( | 976 void WebGraphicsContext3DImpl::copyTextureToParentTextureCHROMIUM( |
976 WebGLId texture, WebGLId parentTexture) { | 977 WebGLId texture, WebGLId parentTexture) { |
977 NOTIMPLEMENTED(); | 978 NOTIMPLEMENTED(); |
978 } | 979 } |
979 | 980 |
980 void WebGraphicsContext3DImpl::releaseShaderCompiler() { | 981 void WebGraphicsContext3DImpl::releaseShaderCompiler() { |
981 } | 982 } |
982 | 983 |
| 984 // static |
| 985 void WebGraphicsContext3DImpl::ConvertAttributes( |
| 986 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 987 ::gpu::gles2::ContextCreationAttribHelper* output_attribs) { |
| 988 output_attribs->alpha_size = attributes.alpha ? 8 : 0; |
| 989 output_attribs->depth_size = attributes.depth ? 24 : 0; |
| 990 output_attribs->stencil_size = attributes.stencil ? 8 : 0; |
| 991 output_attribs->samples = attributes.antialias ? 4 : 0; |
| 992 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
| 993 output_attribs->fail_if_major_perf_caveat = |
| 994 attributes.failIfMajorPerformanceCaveat; |
| 995 output_attribs->bind_generates_resource = false; |
| 996 } |
| 997 |
983 } // namespace gpu | 998 } // namespace gpu |
984 } // namespace webkit | 999 } // namespace webkit |
OLD | NEW |