Reland image storage with fixes.
Revert "Revert "Initial OpenGL Image support.""
This reverts commit 59dc41175d99d0a31c046aec0c26c4d82a3a3574.
BUG=skia:
Change-Id: Ibe3c87ce7f746f065fdbcc5a518388cc291112f5
Reviewed-on: https://skia-review.googlesource.com/5131
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/include/gpu/GrShaderVar.h b/include/gpu/GrShaderVar.h
index aaae107..1149f84 100644
--- a/include/gpu/GrShaderVar.h
+++ b/include/gpu/GrShaderVar.h
@@ -284,6 +284,14 @@
}
}
+ void setImageStorageFormat(GrImageStorageFormat format);
+
+ void setMemoryModel(GrSLMemoryModel);
+
+ void setRestrict(GrSLRestrict);
+
+ void setIOType(GrIOType);
+
void addModifier(const char* modifier) {
if (modifier) {
fExtraModifiers.appendf("%s ", modifier);
@@ -310,23 +318,6 @@
}
private:
- static const char* TypeModifierString(TypeModifier t) {
- switch (t) {
- case kNone_TypeModifier:
- return "";
- case kIn_TypeModifier:
- return "in";
- case kInOut_TypeModifier:
- return "inout";
- case kOut_TypeModifier:
- return "out";
- case kUniform_TypeModifier:
- return "uniform";
- }
- SkFAIL("Unknown shader variable type modifier.");
- return ""; // suppress warning
- }
-
GrSLType fType;
TypeModifier fTypeModifier;
int fCount;