OLD | NEW |
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 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 //////////////////////////////////////////////////////////////////////////////// | 923 //////////////////////////////////////////////////////////////////////////////// |
924 | 924 |
925 GrGLFragmentOnlyShaderBuilder::GrGLFragmentOnlyShaderBuilder(GrGpuGL* gpu, | 925 GrGLFragmentOnlyShaderBuilder::GrGLFragmentOnlyShaderBuilder(GrGpuGL* gpu, |
926 GrGLUniformManager&
uniformManager, | 926 GrGLUniformManager&
uniformManager, |
927 const GrGLProgramDe
sc& desc) | 927 const GrGLProgramDe
sc& desc) |
928 : INHERITED(gpu, uniformManager, desc) | 928 : INHERITED(gpu, uniformManager, desc) |
929 , fNumTexCoordSets(0) { | 929 , fNumTexCoordSets(0) { |
930 | 930 |
931 SkASSERT(!desc.getHeader().fHasVertexCode); | 931 SkASSERT(!desc.getHeader().fHasVertexCode); |
932 SkASSERT(gpu->glCaps().fixedFunctionSupport()); | 932 SkASSERT(gpu->glCaps().fixedFunctionSupport()); |
933 SkASSERT(gpu->glCaps().pathStencilingSupport()); | 933 SkASSERT(gpu->glCaps().pathRenderingSupport()); |
934 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorIn
put); | 934 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorIn
put); |
935 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverag
eInput); | 935 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverag
eInput); |
936 } | 936 } |
937 | 937 |
938 GrGLProgramEffects* GrGLFragmentOnlyShaderBuilder::createAndEmitEffects( | 938 GrGLProgramEffects* GrGLFragmentOnlyShaderBuilder::createAndEmitEffects( |
939 const GrEffectStage* effectStages[], | 939 const GrEffectStage* effectStages[], |
940 const EffectKey effectKeys[], | 940 const EffectKey effectKeys[], |
941 int effectCnt, | 941 int effectCnt, |
942 SkString* inOutFSColor, | 942 SkString* inOutFSColor, |
943 GrSLConstantVec* fsInOutColorKnownValue) { | 943 GrSLConstantVec* fsInOutColorKnownValue) { |
944 | 944 |
945 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt); | 945 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt); |
946 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder, | 946 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder, |
947 effectStages, | 947 effectStages, |
948 effectKeys, | 948 effectKeys, |
949 effectCnt, | 949 effectCnt, |
950 inOutFSColor, | 950 inOutFSColor, |
951 fsInOutColorKnownValue); | 951 fsInOutColorKnownValue); |
952 return texGenEffectsBuilder.finish(); | 952 return texGenEffectsBuilder.finish(); |
953 } | 953 } |
OLD | NEW |