Tracking uniform ownership
This is a prerequisite change for the upcoming sample(child, matrix)
function. By itself, this CL doesn't really change anything; it just
adds an ownership tracking feature which sample(child, matrix) depends
on.
Change-Id: I98b12e5fb062a2535af367931e7a932ea9c63a59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281337
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/effects/GrSkSLFP.cpp b/src/gpu/effects/GrSkSLFP.cpp
index 59c7661..4070c7f 100644
--- a/src/gpu/effects/GrSkSLFP.cpp
+++ b/src/gpu/effects/GrSkSLFP.cpp
@@ -79,7 +79,8 @@
const GrSkSLFP& fp = args.fFp.cast<GrSkSLFP>();
for (const auto& v : fp.fEffect->inputs()) {
if (v.fQualifier == SkRuntimeEffect::Variable::Qualifier::kUniform) {
- auto handle = args.fUniformHandler->addUniformArray(kFragment_GrShaderFlag,
+ auto handle = args.fUniformHandler->addUniformArray(&fp,
+ kFragment_GrShaderFlag,
v.fGPUType,
v.fName.c_str(),
v.isArray() ? v.fCount : 0);