24 "half4 main(float2 coords) {"
25 "return half4(coords.xy01);"
52 "half4 main(half4 color) {"
77 "uniform float3x3 MyFloat3x3Uniform;"
78 "uniform int4 MyInt4ArrayUniform[1];"
79 "uniform half2 MyHalf2ArrayUniform[99];"
80 "half4 main(float2 coords) {"
81 "return half4(coords.xy01);"
100 std::string_view(snippet->
fUniforms[0].name()) ==
"MyFloat3x3Uniform");
105 std::string_view(snippet->
fUniforms[1].name()) ==
"MyInt4ArrayUniform");
110 std::string_view(snippet->
fUniforms[2].name()) ==
"MyHalf2ArrayUniform");
121 "uniform float3x3 MyFloat3x3Uniform;"
122 "uniform int4 MyInt4ArrayUniform[1];"
123 "uniform half2 MyHalf2ArrayUniform[99];"
124 "half4 main(half4 color) {"
134 testEffect =
nullptr;
144 std::string_view(snippet->
fUniforms[0].name()) ==
"MyFloat3x3Uniform");
149 std::string_view(snippet->
fUniforms[1].name()) ==
"MyInt4ArrayUniform");
154 std::string_view(snippet->
fUniforms[2].name()) ==
"MyHalf2ArrayUniform");
DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(Shader_FindOrCreateSnippetForRuntimeEffect, reporter, context, CtsEnforcement::kNextRelease)
SkRuntimeEffect * SkMakeRuntimeEffect(SkRuntimeEffect::Result(*make)(SkString, const SkRuntimeEffect::Options &), const char *sksl, SkRuntimeEffect::Options options=SkRuntimeEffect::Options{})
#define REPORTER_ASSERT(r, cond,...)
static Result MakeForColorFilter(SkString sksl, const Options &)
static Result MakeForShader(SkString sksl, const Options &)
int findOrCreateRuntimeEffectSnippet(const SkRuntimeEffect *effect)
const ShaderSnippet * getEntry(int codeSnippetID) const SK_EXCLUDES(fSpinLock)
static constexpr int kUnknownRuntimeEffectIDStart
SkSpan< const Uniform > fUniforms