Cleanup some legacy instantiate calls
Since explicit resource allocation has stuck these instantiate calls are no longer required.
Change-Id: I5a8a7fa714eb1e9550f4f645ce8fced2d5f7aa4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222457
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 9a338f3..becb9e4 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -52,25 +52,26 @@
processors.numCoverageFragmentProcessors() +
appliedClip.numClipCoverageFragmentProcessors();
fFragmentProcessors.reset(numTotalProcessors);
+
int currFPIdx = 0;
for (int i = 0; i < processors.numColorFragmentProcessors(); ++i, ++currFPIdx) {
fFragmentProcessors[currFPIdx] = processors.detachColorFragmentProcessor(i);
- if (!fFragmentProcessors[currFPIdx]->instantiate(args.fResourceProvider)) {
- this->markAsBad();
- }
}
for (int i = 0; i < processors.numCoverageFragmentProcessors(); ++i, ++currFPIdx) {
fFragmentProcessors[currFPIdx] = processors.detachCoverageFragmentProcessor(i);
- if (!fFragmentProcessors[currFPIdx]->instantiate(args.fResourceProvider)) {
- this->markAsBad();
- }
}
for (int i = 0; i < appliedClip.numClipCoverageFragmentProcessors(); ++i, ++currFPIdx) {
fFragmentProcessors[currFPIdx] = appliedClip.detachClipCoverageFragmentProcessor(i);
- if (!fFragmentProcessors[currFPIdx]->instantiate(args.fResourceProvider)) {
+ }
+
+#ifdef SK_DEBUG
+ for (int i = 0; i < numTotalProcessors; ++i) {
+ if (!fFragmentProcessors[i]->isInstantiated()) {
this->markAsBad();
+ break;
}
}
+#endif
}
void GrPipeline::addDependenciesTo(GrOpList* opList, const GrCaps& caps) const {