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

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1420033002: Revert of Add version string and force highp NDS transfrom to GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@renameShaderVar
Patch Set: Created 5 years, 2 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 | « src/gpu/gl/GrGLGLSL.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2802 2802
2803 if (can_blit_framebuffer(dst, src, this)) { 2803 if (can_blit_framebuffer(dst, src, this)) {
2804 return this->copySurfaceAsBlitFramebuffer(dst, src, srcRect, dstPoint); 2804 return this->copySurfaceAsBlitFramebuffer(dst, src, srcRect, dstPoint);
2805 } 2805 }
2806 2806
2807 return false; 2807 return false;
2808 } 2808 }
2809 2809
2810 2810
2811 void GrGLGpu::createCopyProgram() { 2811 void GrGLGpu::createCopyProgram() {
2812 const char* version = this->glCaps().glslCaps()->versionDeclString(); 2812 const char* version = GrGLGetGLSLVersionDecl(this->ctxInfo());
2813 2813
2814 GrGLSLShaderVar aVertex("a_vertex", kVec2f_GrSLType, GrShaderVar::kAttribute _TypeModifier); 2814 GrGLSLShaderVar aVertex("a_vertex", kVec2f_GrSLType, GrShaderVar::kAttribute _TypeModifier);
2815 GrGLSLShaderVar uTexCoordXform("u_texCoordXform", kVec4f_GrSLType, 2815 GrGLSLShaderVar uTexCoordXform("u_texCoordXform", kVec4f_GrSLType,
2816 GrShaderVar::kUniform_TypeModifier); 2816 GrShaderVar::kUniform_TypeModifier);
2817 GrGLSLShaderVar uPosXform("u_posXform", kVec4f_GrSLType, GrShaderVar::kUnifo rm_TypeModifier); 2817 GrGLSLShaderVar uPosXform("u_posXform", kVec4f_GrSLType, GrShaderVar::kUnifo rm_TypeModifier);
2818 GrGLSLShaderVar uTexture("u_texture", kSampler2D_GrSLType, GrShaderVar::kUni form_TypeModifier); 2818 GrGLSLShaderVar uTexture("u_texture", kSampler2D_GrSLType, GrShaderVar::kUni form_TypeModifier);
2819 GrGLSLShaderVar vTexCoord("v_texCoord", kVec2f_GrSLType, GrShaderVar::kVaryi ngOut_TypeModifier); 2819 GrGLSLShaderVar vTexCoord("v_texCoord", kVec2f_GrSLType, GrShaderVar::kVaryi ngOut_TypeModifier);
2820 GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut _TypeModifier); 2820 GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut _TypeModifier);
2821 2821
2822 SkString vshaderTxt(version); 2822 SkString vshaderTxt(version);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 this->setVertexArrayID(gpu, 0); 3182 this->setVertexArrayID(gpu, 0);
3183 } 3183 }
3184 int attrCount = gpu->glCaps().maxVertexAttributes(); 3184 int attrCount = gpu->glCaps().maxVertexAttributes();
3185 if (fDefaultVertexArrayAttribState.count() != attrCount) { 3185 if (fDefaultVertexArrayAttribState.count() != attrCount) {
3186 fDefaultVertexArrayAttribState.resize(attrCount); 3186 fDefaultVertexArrayAttribState.resize(attrCount);
3187 } 3187 }
3188 attribState = &fDefaultVertexArrayAttribState; 3188 attribState = &fDefaultVertexArrayAttribState;
3189 } 3189 }
3190 return attribState; 3190 return attribState;
3191 } 3191 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGLSL.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698