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; | |
643 | |
644 void WebGraphicsContext3DImpl::texParameteri( | 642 void WebGraphicsContext3DImpl::texParameteri( |
645 WGC3Denum target, WGC3Denum pname, WGC3Dint param) { | 643 WGC3Denum target, WGC3Denum pname, WGC3Dint param) { |
646 // TODO(kbr): figure out whether the setting of TEXTURE_WRAP_R in | |
legend
2015/05/11 07:17:14
@kbr and others, i'm not sure if this comment and
piman
2015/05/11 21:39:34
FYI on ES, cube maps are always seamless regardles
Zhenyao Mo
2015/05/11 23:23:44
Yes, remove it.
| |
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); | 644 gl_->TexParameteri(target, pname, param); |
654 } | 645 } |
655 | 646 |
656 DELEGATE_TO_GL_9(texSubImage2D, TexSubImage2D, | 647 DELEGATE_TO_GL_9(texSubImage2D, TexSubImage2D, |
657 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, | 648 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, |
658 WGC3Dsizei, WGC3Denum, WGC3Denum, const void*) | 649 WGC3Dsizei, WGC3Denum, WGC3Denum, const void*) |
659 | 650 |
660 DELEGATE_TO_GL_2(uniform1f, Uniform1f, WGC3Dint, WGC3Dfloat) | 651 DELEGATE_TO_GL_2(uniform1f, Uniform1f, WGC3Dint, WGC3Dfloat) |
661 | 652 |
662 DELEGATE_TO_GL_3(uniform1fv, Uniform1fv, WGC3Dint, WGC3Dsizei, | 653 DELEGATE_TO_GL_3(uniform1fv, Uniform1fv, WGC3Dint, WGC3Dsizei, |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1232 output_attribs->samples = attributes.antialias ? 4 : 0; | 1223 output_attribs->samples = attributes.antialias ? 4 : 0; |
1233 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; | 1224 output_attribs->sample_buffers = attributes.antialias ? 1 : 0; |
1234 output_attribs->fail_if_major_perf_caveat = | 1225 output_attribs->fail_if_major_perf_caveat = |
1235 attributes.failIfMajorPerformanceCaveat; | 1226 attributes.failIfMajorPerformanceCaveat; |
1236 output_attribs->bind_generates_resource = false; | 1227 output_attribs->bind_generates_resource = false; |
1237 output_attribs->es3_context_required = | 1228 output_attribs->es3_context_required = |
1238 (attributes.webGL && attributes.webGLVersion == 2); | 1229 (attributes.webGL && attributes.webGLVersion == 2); |
1239 } | 1230 } |
1240 | 1231 |
1241 } // namespace gpu_blink | 1232 } // namespace gpu_blink |
OLD | NEW |