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 12 matching lines...) Expand all Loading... |
23 using blink::WGC3Dboolean; | 23 using blink::WGC3Dboolean; |
24 using blink::WGC3Dbyte; | 24 using blink::WGC3Dbyte; |
25 using blink::WGC3Dchar; | 25 using blink::WGC3Dchar; |
26 using blink::WGC3Dclampf; | 26 using blink::WGC3Dclampf; |
27 using blink::WGC3Denum; | 27 using blink::WGC3Denum; |
28 using blink::WGC3Dfloat; | 28 using blink::WGC3Dfloat; |
29 using blink::WGC3Dint; | 29 using blink::WGC3Dint; |
30 using blink::WGC3Dintptr; | 30 using blink::WGC3Dintptr; |
31 using blink::WGC3Dsizei; | 31 using blink::WGC3Dsizei; |
32 using blink::WGC3Dsizeiptr; | 32 using blink::WGC3Dsizeiptr; |
| 33 using blink::WGC3Dint64; |
33 using blink::WGC3Duint64; | 34 using blink::WGC3Duint64; |
34 using blink::WGC3Duint; | 35 using blink::WGC3Duint; |
35 using blink::WebGLId; | 36 using blink::WebGLId; |
36 using blink::WGC3Dsync; | 37 using blink::WGC3Dsync; |
37 | 38 |
38 namespace gpu_blink { | 39 namespace gpu_blink { |
39 | 40 |
40 namespace { | 41 namespace { |
41 | 42 |
42 uint32_t GenFlushID() { | 43 uint32_t GenFlushID() { |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 } | 448 } |
448 | 449 |
449 DELEGATE_TO_GL_2(getFloatv, GetFloatv, WGC3Denum, WGC3Dfloat*) | 450 DELEGATE_TO_GL_2(getFloatv, GetFloatv, WGC3Denum, WGC3Dfloat*) |
450 | 451 |
451 DELEGATE_TO_GL_4(getFramebufferAttachmentParameteriv, | 452 DELEGATE_TO_GL_4(getFramebufferAttachmentParameteriv, |
452 GetFramebufferAttachmentParameteriv, | 453 GetFramebufferAttachmentParameteriv, |
453 WGC3Denum, WGC3Denum, WGC3Denum, WGC3Dint*) | 454 WGC3Denum, WGC3Denum, WGC3Denum, WGC3Dint*) |
454 | 455 |
455 DELEGATE_TO_GL_2(getIntegerv, GetIntegerv, WGC3Denum, WGC3Dint*) | 456 DELEGATE_TO_GL_2(getIntegerv, GetIntegerv, WGC3Denum, WGC3Dint*) |
456 | 457 |
| 458 DELEGATE_TO_GL_2(getInteger64v, GetInteger64v, WGC3Denum, WGC3Dint64*) |
| 459 |
457 DELEGATE_TO_GL_3(getProgramiv, GetProgramiv, WebGLId, WGC3Denum, WGC3Dint*) | 460 DELEGATE_TO_GL_3(getProgramiv, GetProgramiv, WebGLId, WGC3Denum, WGC3Dint*) |
458 | 461 |
459 blink::WebString WebGraphicsContext3DImpl::getProgramInfoLog( | 462 blink::WebString WebGraphicsContext3DImpl::getProgramInfoLog( |
460 WebGLId program) { | 463 WebGLId program) { |
461 GLint logLength = 0; | 464 GLint logLength = 0; |
462 gl_->GetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength); | 465 gl_->GetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength); |
463 if (!logLength) | 466 if (!logLength) |
464 return blink::WebString(); | 467 return blink::WebString(); |
465 scoped_ptr<GLchar[]> log(new GLchar[logLength]); | 468 scoped_ptr<GLchar[]> log(new GLchar[logLength]); |
466 if (!log) | 469 if (!log) |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 output_attribs->samples = attributes.antialias ? 4 : 0; | 1224 output_attribs->samples = attributes.antialias ? 4 : 0; |
1222 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1225 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
1223 output_attribs->fail_if_major_perf_caveat = | 1226 output_attribs->fail_if_major_perf_caveat = |
1224 attributes.failIfMajorPerformanceCaveat; | 1227 attributes.failIfMajorPerformanceCaveat; |
1225 output_attribs->bind_generates_resource = false; | 1228 output_attribs->bind_generates_resource = false; |
1226 output_attribs->es3_context_required = | 1229 output_attribs->es3_context_required = |
1227 (attributes.webGL && attributes.webGLVersion == 2); | 1230 (attributes.webGL && attributes.webGLVersion == 2); |
1228 } | 1231 } |
1229 | 1232 |
1230 } // namespace gpu_blink | 1233 } // namespace gpu_blink |
OLD | NEW |