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 "GrGeometryProcessor.h" | 8 #include "GrGeometryProcessor.h" |
9 | 9 |
10 #include "GrCoordTransform.h" | 10 #include "GrCoordTransform.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 combined.set(SkMatrix::kMTransY, | 112 combined.set(SkMatrix::kMTransY, |
113 combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]); | 113 combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]); |
114 } | 114 } |
115 return combined; | 115 return combined; |
116 } | 116 } |
117 | 117 |
118 void | 118 void |
119 GrGLPrimitiveProcessor::setupColorPassThrough(GrGLGPBuilder* pb, | 119 GrGLPrimitiveProcessor::setupColorPassThrough(GrGLGPBuilder* pb, |
120 GrGPInput inputType, | 120 GrGPInput inputType, |
121 const char* outputName, | 121 const char* outputName, |
122 const GrGeometryProcessor::GrAttri
bute* colorAttr, | 122 const GrGeometryProcessor::Attribu
te* colorAttr, |
123 UniformHandle* colorUniform) { | 123 UniformHandle* colorUniform) { |
124 GrGLGPFragmentBuilder* fs = pb->getFragmentShaderBuilder(); | 124 GrGLGPFragmentBuilder* fs = pb->getFragmentShaderBuilder(); |
125 if (kUniform_GrGPInput == inputType) { | 125 if (kUniform_GrGPInput == inputType) { |
126 SkASSERT(colorUniform); | 126 SkASSERT(colorUniform); |
127 const char* stagedLocalVarName; | 127 const char* stagedLocalVarName; |
128 *colorUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility, | 128 *colorUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
129 kVec4f_GrSLType, | 129 kVec4f_GrSLType, |
130 kDefault_GrSLPrecision, | 130 kDefault_GrSLPrecision, |
131 "Color", | 131 "Color", |
132 &stagedLocalVarName); | 132 &stagedLocalVarName); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 const GrGLCaps& caps)
const { | 531 const GrGLCaps& caps)
const { |
532 SkASSERT(caps.nvprSupport() != GrGLCaps::kNone_NvprSupport); | 532 SkASSERT(caps.nvprSupport() != GrGLCaps::kNone_NvprSupport); |
533 if (caps.nvprSupport() == GrGLCaps::kLegacy_NvprSupport) { | 533 if (caps.nvprSupport() == GrGLCaps::kLegacy_NvprSupport) { |
534 return SkNEW_ARGS(GrGLLegacyPathProcessor, (*this, bt, | 534 return SkNEW_ARGS(GrGLLegacyPathProcessor, (*this, bt, |
535 caps.maxFixedFunctionTexture
Coords())); | 535 caps.maxFixedFunctionTexture
Coords())); |
536 } else { | 536 } else { |
537 return SkNEW_ARGS(GrGLNormalPathProcessor, (*this, bt)); | 537 return SkNEW_ARGS(GrGLNormalPathProcessor, (*this, bt)); |
538 } | 538 } |
539 } | 539 } |
540 | 540 |
OLD | NEW |