Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1133033002: Update GetTexParameter* and TexParameter* for ES3 in GPU command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use previous macro Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698