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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
632 DELEGATE_TO_GL_4(stencilOpSeparate, StencilOpSeparate, | 632 DELEGATE_TO_GL_4(stencilOpSeparate, StencilOpSeparate, |
633 WGC3Denum, WGC3Denum, WGC3Denum, WGC3Denum) | 633 WGC3Denum, WGC3Denum, WGC3Denum, WGC3Denum) |
634 | 634 |
635 DELEGATE_TO_GL_9(texImage2D, TexImage2D, | 635 DELEGATE_TO_GL_9(texImage2D, TexImage2D, |
636 WGC3Denum, WGC3Dint, WGC3Denum, WGC3Dsizei, WGC3Dsizei, | 636 WGC3Denum, WGC3Dint, WGC3Denum, WGC3Dsizei, WGC3Dsizei, |
637 WGC3Dint, WGC3Denum, WGC3Denum, const void*) | 637 WGC3Dint, WGC3Denum, WGC3Denum, const void*) |
638 | 638 |
639 DELEGATE_TO_GL_3(texParameterf, TexParameterf, | 639 DELEGATE_TO_GL_3(texParameterf, TexParameterf, |
640 WGC3Denum, WGC3Denum, WGC3Dfloat); | 640 WGC3Denum, WGC3Denum, WGC3Dfloat); |
641 | 641 |
642 static const unsigned int kTextureWrapR = 0x8072; | 642 DELEGATE_TO_GL_3(texParameteri, TexParameteri, |
643 | 643 WGC3Denum, WGC3Denum, WGC3Dint); |
legend
2015/05/12 03:23:16
Since the TODOs can be removed, here use the previ
| |
644 void WebGraphicsContext3DImpl::texParameteri( | |
645 WGC3Denum target, WGC3Denum pname, WGC3Dint param) { | |
646 // TODO(kbr): figure out whether the setting of TEXTURE_WRAP_R in | |
647 // GraphicsContext3D.cpp is strictly necessary to avoid seams at the | |
648 // edge of cube maps, and, if it is, push it into the GLES2 service | |
649 // side code. | |
650 if (pname == kTextureWrapR) { | |
651 return; | |
652 } | |
653 gl_->TexParameteri(target, pname, param); | |
654 } | |
655 | 644 |
656 DELEGATE_TO_GL_9(texSubImage2D, TexSubImage2D, | 645 DELEGATE_TO_GL_9(texSubImage2D, TexSubImage2D, |
657 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, | 646 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, |
658 WGC3Dsizei, WGC3Denum, WGC3Denum, const void*) | 647 WGC3Dsizei, WGC3Denum, WGC3Denum, const void*) |
659 | 648 |
660 DELEGATE_TO_GL_2(uniform1f, Uniform1f, WGC3Dint, WGC3Dfloat) | 649 DELEGATE_TO_GL_2(uniform1f, Uniform1f, WGC3Dint, WGC3Dfloat) |
661 | 650 |
662 DELEGATE_TO_GL_3(uniform1fv, Uniform1fv, WGC3Dint, WGC3Dsizei, | 651 DELEGATE_TO_GL_3(uniform1fv, Uniform1fv, WGC3Dint, WGC3Dsizei, |
663 const WGC3Dfloat*) | 652 const WGC3Dfloat*) |
664 | 653 |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1232 output_attribs->samples = attributes.antialias ? 4 : 0; | 1221 output_attribs->samples = attributes.antialias ? 4 : 0; |
1233 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1222 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
1234 output_attribs->fail_if_major_perf_caveat = | 1223 output_attribs->fail_if_major_perf_caveat = |
1235 attributes.failIfMajorPerformanceCaveat; | 1224 attributes.failIfMajorPerformanceCaveat; |
1236 output_attribs->bind_generates_resource = false; | 1225 output_attribs->bind_generates_resource = false; |
1237 output_attribs->es3_context_required = | 1226 output_attribs->es3_context_required = |
1238 (attributes.webGL && attributes.webGLVersion == 2); | 1227 (attributes.webGL && attributes.webGLVersion == 2); |
1239 } | 1228 } |
1240 | 1229 |
1241 } // namespace gpu_blink | 1230 } // namespace gpu_blink |
OLD | NEW |