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

Side by Side Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp

Issue 551253004: Changes to remove program effects builder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 3 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
OLDNEW
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 "GrGLFragmentShaderBuilder.h" 8 #include "GrGLFragmentShaderBuilder.h"
9 #include "GrGLShaderStringBuilder.h" 9 #include "GrGLShaderStringBuilder.h"
10 #include "GrGLProgramBuilder.h" 10 #include "GrGLProgramBuilder.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 return true; 114 return true;
115 } 115 }
116 default: 116 default:
117 SkFAIL("Unexpected GLSLFeature requested."); 117 SkFAIL("Unexpected GLSLFeature requested.");
118 return false; 118 return false;
119 } 119 }
120 } 120 }
121 121
122 SkString GrGLFragmentShaderBuilder::ensureFSCoords2D(const TransformedCoordsArra y& coords, int index) { 122 SkString GrGLFragmentShaderBuilder::ensureFSCoords2D(const TransformedCoordsArra y& coords, int index) {
123 if (kVec3f_GrSLType != coords[index].type()) { 123 if (kVec3f_GrSLType != coords[index].getType()) {
124 SkASSERT(kVec2f_GrSLType == coords[index].type()); 124 SkASSERT(kVec2f_GrSLType == coords[index].getType());
125 return coords[index].getName(); 125 return coords[index].getName();
126 } 126 }
127 127
128 SkString coords2D("coords2D"); 128 SkString coords2D("coords2D");
129 if (0 != index) { 129 if (0 != index) {
130 coords2D.appendf("_%i", index); 130 coords2D.appendf("_%i", index);
131 } 131 }
132 this->codeAppendf("\tvec2 %s = %s.xy / %s.z;", 132 this->codeAppendf("\tvec2 %s = %s.xy / %s.z;",
133 coords2D.c_str(), coords[index].c_str(), coords[index].c_s tr()); 133 coords2D.c_str(), coords[index].c_str(), coords[index].c_s tr());
134 return coords2D; 134 return coords2D;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 dual_source_output_name()); 343 dual_source_output_name());
344 fHasSecondaryOutput = true; 344 fHasSecondaryOutput = true;
345 } 345 }
346 return dual_source_output_name(); 346 return dual_source_output_name();
347 } 347 }
348 348
349 const char* GrGLFragmentShaderBuilder::getColorOutputName() const { 349 const char* GrGLFragmentShaderBuilder::getColorOutputName() const {
350 return fHasCustomColorOutput ? declared_color_output_name() : "gl_FragColor" ; 350 return fHasCustomColorOutput ? declared_color_output_name() : "gl_FragColor" ;
351 } 351 }
352 352
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.cpp ('k') | src/gpu/gl/builders/GrGLFullProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698