aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLContext.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-06-27 11:20:22 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-27 18:27:57 +0000
commitc070939fd1a954b7a492bc30f0cf64a664b90181 (patch)
tree6b1167726bc9ac4d2073f893c699b40c70f63ba1 /src/sksl/SkSLContext.h
parent26249e0e1d1b18a1e67195a2998b49958426f8ba (diff)
Re-land sksl fragment processor support
This reverts commit ed50200682e0de72c3abecaa4d5324ebcd1ed9f9. Bug: skia: Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab Reviewed-on: https://skia-review.googlesource.com/20965 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLContext.h')
-rw-r--r--src/sksl/SkSLContext.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/sksl/SkSLContext.h b/src/sksl/SkSLContext.h
index 53e5ea0954..1155af4817 100644
--- a/src/sksl/SkSLContext.h
+++ b/src/sksl/SkSLContext.h
@@ -66,8 +66,7 @@ public:
, fSamplerExternalOES_Type(new Type(String("samplerExternalOES"), SpvDim2D, false, false,
false, true))
, fSamplerCube_Type(new Type(String("samplerCube"), SpvDimCube, false, false, false, true))
- , fSampler2DRect_Type(new Type(String("sampler2DRect"), SpvDimRect, false, false, false,
- true))
+ , fSampler2DRect_Type(new Type(String("sampler2DRect"), SpvDimRect, false, false, false, true))
, fSampler1DArray_Type(new Type(String("sampler1DArray")))
, fSampler2DArray_Type(new Type(String("sampler2DArray")))
, fSamplerCubeArray_Type(new Type(String("samplerCubeArray")))
@@ -151,6 +150,8 @@ public:
, fBVec_Type(new Type(String("$bvec"), { fInvalid_Type.get(), fBVec2_Type.get(),
fBVec3_Type.get(), fBVec4_Type.get() }))
, fSkCaps_Type(new Type(String("$sk_Caps")))
+ , fSkArgs_Type(new Type(String("$sk_Args")))
+ , fColorSpaceXform_Type(new Type(String("colorSpaceXform"), *fFloat_Type, 4, 4))
, fDefined_Expression(new Defined(*fInvalid_Type)) {}
static std::vector<const Type*> static_type(const Type& t) {
@@ -225,7 +226,6 @@ public:
const std::unique_ptr<Type> fSampler2DArrayShadow_Type;
const std::unique_ptr<Type> fSamplerCubeArrayShadow_Type;
-
const std::unique_ptr<Type> fISampler2D_Type;
const std::unique_ptr<Type> fImage2D_Type;
@@ -269,6 +269,8 @@ public:
const std::unique_ptr<Type> fBVec_Type;
const std::unique_ptr<Type> fSkCaps_Type;
+ const std::unique_ptr<Type> fSkArgs_Type;
+ const std::unique_ptr<Type> fColorSpaceXform_Type;
// dummy expression used to mark that a variable has a value during dataflow analysis (when it
// could have several different values, or the analyzer is otherwise unable to assign it a
@@ -281,14 +283,14 @@ private:
Defined(const Type& type)
: INHERITED(Position(), kDefined_Kind, type) {}
- virtual String description() const override {
- return String("<defined>");
- }
-
bool hasSideEffects() const override {
return false;
}
+ String description() const override {
+ return String("<defined>");
+ }
+
typedef Expression INHERITED;
};
};