| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrGLSLPrimitiveProcessor.h" | 8 #include "GrGLSLPrimitiveProcessor.h" |
| 9 | 9 |
| 10 #include "GrCoordTransform.h" | 10 #include "GrCoordTransform.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 return combined; | 34 return combined; |
| 35 } | 35 } |
| 36 | 36 |
| 37 void GrGLSLPrimitiveProcessor::setupUniformColor(GrGLSLFragmentBuilder* fragBuil
der, | 37 void GrGLSLPrimitiveProcessor::setupUniformColor(GrGLSLFragmentBuilder* fragBuil
der, |
| 38 GrGLSLUniformHandler* uniformHa
ndler, | 38 GrGLSLUniformHandler* uniformHa
ndler, |
| 39 const char* outputName, | 39 const char* outputName, |
| 40 UniformHandle* colorUniform) { | 40 UniformHandle* colorUniform) { |
| 41 SkASSERT(colorUniform); | 41 SkASSERT(colorUniform); |
| 42 const char* stagedLocalVarName; | 42 const char* stagedLocalVarName; |
| 43 *colorUniform = uniformHandler->addUniform(GrGLSLUniformHandler::kFragment_V
isibility, | 43 *colorUniform = uniformHandler->addUniform(kFragment_GrShaderFlag, |
| 44 kVec4f_GrSLType, | 44 kVec4f_GrSLType, |
| 45 kDefault_GrSLPrecision, | 45 kDefault_GrSLPrecision, |
| 46 "Color", | 46 "Color", |
| 47 &stagedLocalVarName); | 47 &stagedLocalVarName); |
| 48 fragBuilder->codeAppendf("%s = %s;", outputName, stagedLocalVarName); | 48 fragBuilder->codeAppendf("%s = %s;", outputName, stagedLocalVarName); |
| 49 } | 49 } |
| OLD | NEW |