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 { |