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

Unified Diff: src/gpu/glsl/GrGLSLShaderBuilder.cpp

Issue 1693113002: Revert of Add infastructure for gl_SampleMask (Closed) Base URL: https://skia.googlesource.com/skia.git@upload7_interp
Patch Set: Created 4 years, 10 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/glsl/GrGLSLShaderBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLShaderBuilder.cpp
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index 30bf86d2106c98ac3960865d3f6373e601dd2e92..c94a85534f7fb7b3ec767ecced979b2a50c7af30 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -112,13 +112,11 @@
this->codeAppend((GrGLSLExpr4(modulation) * GrGLSLExpr4(lookup)).c_str());
}
-bool GrGLSLShaderBuilder::addFeature(uint32_t featureBit, const char* extensionName) {
- if (featureBit & fFeaturesAddedMask) {
- return false;
+void GrGLSLShaderBuilder::addFeature(uint32_t featureBit, const char* extensionName) {
+ if (!(featureBit & fFeaturesAddedMask)) {
+ this->extensions().appendf("#extension %s: require\n", extensionName);
+ fFeaturesAddedMask |= featureBit;
}
- this->extensions().appendf("#extension %s: require\n", extensionName);
- fFeaturesAddedMask |= featureBit;
- return true;
}
void GrGLSLShaderBuilder::appendDecls(const VarArray& vars, SkString* out) const {
« no previous file with comments | « src/gpu/glsl/GrGLSLShaderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698