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

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

Issue 32403002: Fix GrProgramsTest to not generate tests with too many TexCoord references (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: adress Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | src/gpu/gl/GrGpuGL.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 #include "gl/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 : INHERITED(gpu, uniformManager, desc) 936 : INHERITED(gpu, uniformManager, desc)
937 , fNumTexCoordSets(0) { 937 , fNumTexCoordSets(0) {
938 938
939 SkASSERT(!desc.getHeader().fHasVertexCode); 939 SkASSERT(!desc.getHeader().fHasVertexCode);
940 SkASSERT(gpu->glCaps().fixedFunctionSupport()); 940 SkASSERT(gpu->glCaps().fixedFunctionSupport());
941 SkASSERT(gpu->glCaps().pathRenderingSupport()); 941 SkASSERT(gpu->glCaps().pathRenderingSupport());
942 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorIn put); 942 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorIn put);
943 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverag eInput); 943 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverag eInput);
944 } 944 }
945 945
946 int GrGLFragmentOnlyShaderBuilder::addTexCoordSets(int count) {
947 int firstFreeCoordSet = fNumTexCoordSets;
948 fNumTexCoordSets += count;
949 SkASSERT(gpu()->glCaps().maxFixedFunctionTextureCoords() >= fNumTexCoordSets );
950 return firstFreeCoordSet;
951 }
952
946 GrGLProgramEffects* GrGLFragmentOnlyShaderBuilder::createAndEmitEffects( 953 GrGLProgramEffects* GrGLFragmentOnlyShaderBuilder::createAndEmitEffects(
947 const GrEffectStage* effectStages[], 954 const GrEffectStage* effectStages[],
948 const EffectKey effectKeys[], 955 const EffectKey effectKeys[],
949 int effectCnt, 956 int effectCnt,
950 GrGLSLExpr<4>* inOutFSColor) { 957 GrGLSLExpr<4>* inOutFSColor) {
951 958
952 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt); 959 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt);
953 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder, 960 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder,
954 effectStages, 961 effectStages,
955 effectKeys, 962 effectKeys,
956 effectCnt, 963 effectCnt,
957 inOutFSColor); 964 inOutFSColor);
958 return texGenEffectsBuilder.finish(); 965 return texGenEffectsBuilder.finish();
959 } 966 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698