Index: src/gpu/glsl/GrGLSLShaderBuilder.cpp |
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp |
index c94a85534f7fb7b3ec767ecced979b2a50c7af30..30bf86d2106c98ac3960865d3f6373e601dd2e92 100644 |
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp |
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp |
@@ -112,11 +112,13 @@ void GrGLSLShaderBuilder::appendTextureLookupAndModulate(const char* modulation, |
this->codeAppend((GrGLSLExpr4(modulation) * GrGLSLExpr4(lookup)).c_str()); |
} |
-void GrGLSLShaderBuilder::addFeature(uint32_t featureBit, const char* extensionName) { |
- if (!(featureBit & fFeaturesAddedMask)) { |
- this->extensions().appendf("#extension %s: require\n", extensionName); |
- fFeaturesAddedMask |= featureBit; |
+bool GrGLSLShaderBuilder::addFeature(uint32_t featureBit, const char* extensionName) { |
+ if (featureBit & fFeaturesAddedMask) { |
+ return false; |
} |
+ this->extensions().appendf("#extension %s: require\n", extensionName); |
+ fFeaturesAddedMask |= featureBit; |
+ return true; |
} |
void GrGLSLShaderBuilder::appendDecls(const VarArray& vars, SkString* out) const { |