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

Unified Diff: src/gpu/gl/GrGLPrimitiveProcessor.cpp

Issue 1139723004: Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: tweaks Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLPrimitiveProcessor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPrimitiveProcessor.cpp
diff --git a/src/gpu/gl/GrGLPrimitiveProcessor.cpp b/src/gpu/gl/GrGLPrimitiveProcessor.cpp
index 3213ffa8e27549fbf684e0653d2e4ed82690cb76..d719774a6623a02145b637fd150b58e79e0f3f65 100644
--- a/src/gpu/gl/GrGLPrimitiveProcessor.cpp
+++ b/src/gpu/gl/GrGLPrimitiveProcessor.cpp
@@ -31,28 +31,18 @@ SkMatrix GrGLPrimitiveProcessor::GetTransformMatrix(const SkMatrix& localMatrix,
return combined;
}
-void
-GrGLPrimitiveProcessor::setupColorPassThrough(GrGLGPBuilder* pb,
- GrGPInput inputType,
- const char* outputName,
- const GrGeometryProcessor::Attribute* colorAttr,
- UniformHandle* colorUniform) {
+void GrGLPrimitiveProcessor::setupUniformColor(GrGLGPBuilder* pb,
+ const char* outputName,
+ UniformHandle* colorUniform) {
GrGLFragmentBuilder* fs = pb->getFragmentShaderBuilder();
- if (kUniform_GrGPInput == inputType) {
- SkASSERT(colorUniform);
- const char* stagedLocalVarName;
- *colorUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility,
- kVec4f_GrSLType,
- kDefault_GrSLPrecision,
- "Color",
- &stagedLocalVarName);
- fs->codeAppendf("%s = %s;", outputName, stagedLocalVarName);
- } else if (kAttribute_GrGPInput == inputType) {
- SkASSERT(colorAttr);
- pb->addPassThroughAttribute(colorAttr, outputName);
- } else if (kAllOnes_GrGPInput == inputType) {
- fs->codeAppendf("%s = vec4(1);", outputName);
- }
+ SkASSERT(colorUniform);
+ const char* stagedLocalVarName;
+ *colorUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ kVec4f_GrSLType,
+ kDefault_GrSLPrecision,
+ "Color",
+ &stagedLocalVarName);
+ fs->codeAppendf("%s = %s;", outputName, stagedLocalVarName);
}
void GrGLPrimitiveProcessor::addUniformViewMatrix(GrGLGPBuilder* pb) {
« no previous file with comments | « src/gpu/gl/GrGLPrimitiveProcessor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698