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 "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" |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 const blink::WebGraphicsContext3D::Attributes& attributes, | 1176 const blink::WebGraphicsContext3D::Attributes& attributes, |
1177 ::gpu::gles2::ContextCreationAttribHelper* output_attribs) { | 1177 ::gpu::gles2::ContextCreationAttribHelper* output_attribs) { |
1178 output_attribs->alpha_size = attributes.alpha ? 8 : 0; | 1178 output_attribs->alpha_size = attributes.alpha ? 8 : 0; |
1179 output_attribs->depth_size = attributes.depth ? 24 : 0; | 1179 output_attribs->depth_size = attributes.depth ? 24 : 0; |
1180 output_attribs->stencil_size = attributes.stencil ? 8 : 0; | 1180 output_attribs->stencil_size = attributes.stencil ? 8 : 0; |
1181 output_attribs->samples = attributes.antialias ? 4 : 0; | 1181 output_attribs->samples = attributes.antialias ? 4 : 0; |
1182 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1182 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
1183 output_attribs->fail_if_major_perf_caveat = | 1183 output_attribs->fail_if_major_perf_caveat = |
1184 attributes.failIfMajorPerformanceCaveat; | 1184 attributes.failIfMajorPerformanceCaveat; |
1185 output_attribs->bind_generates_resource = false; | 1185 output_attribs->bind_generates_resource = false; |
| 1186 output_attribs->es3_context_required = |
| 1187 (attributes.webGL && attributes.webGLVersion == 2); |
1186 } | 1188 } |
1187 | 1189 |
1188 } // namespace gpu_blink | 1190 } // namespace gpu_blink |
OLD | NEW |