renamed SkSL texture() and process() to sample()
Bug: skia:
Change-Id: I2ae0caf08f8434302cae8151ae1ea0fda8d56928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230397
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 1079d96..61a7c11 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -470,7 +470,7 @@
(*fFunctionClasses)["min"] = FunctionClass::kMin;
(*fFunctionClasses)["pow"] = FunctionClass::kPow;
(*fFunctionClasses)["saturate"] = FunctionClass::kSaturate;
- (*fFunctionClasses)["texture"] = FunctionClass::kTexture;
+ (*fFunctionClasses)["sample"] = FunctionClass::kTexture;
(*fFunctionClasses)["transpose"] = FunctionClass::kTranspose;
}
#ifndef SKSL_STANDALONE
@@ -670,12 +670,16 @@
proj = false;
break;
}
- this->write("texture");
- if (fProgram.fSettings.fCaps->generation() < k130_GrGLSLGeneration) {
- this->write(dim);
- }
- if (proj) {
- this->write("Proj");
+ if (fTextureFunctionOverride != "") {
+ this->write(fTextureFunctionOverride.c_str());
+ } else {
+ this->write("texture");
+ if (fProgram.fSettings.fCaps->generation() < k130_GrGLSLGeneration) {
+ this->write(dim);
+ }
+ if (proj) {
+ this->write("Proj");
+ }
}
nameWritten = true;
break;