Revise system for checking for uninstantiated proxies
The new pattern is:
we will "instantiate" pipelines at flush time
at flush time we will only access the backing GrSurface by peeking
If instantiation fails we should never try to access the GrSurfaces
Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6
Reviewed-on: https://skia-review.googlesource.com/17932
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h
index 00f2dbd..ec8f317 100644
--- a/src/gpu/GrFragmentProcessor.h
+++ b/src/gpu/GrFragmentProcessor.h
@@ -109,6 +109,8 @@
const GrFragmentProcessor& childProcessor(int index) const { return *fChildProcessors[index]; }
+ bool instantiate(GrResourceProvider*) const;
+
/** Do any of the coordtransforms for this processor require local coords? */
bool usesLocalCoords() const { return SkToBool(fFlags & kUsesLocalCoords_Flag); }
@@ -345,7 +347,7 @@
*/
SkSTArray<1, GrFragmentProcessor*, true> fChildProcessors;
- typedef GrProcessor INHERITED;
+ typedef GrResourceIOProcessor INHERITED;
};
GR_MAKE_BITFIELD_OPS(GrFragmentProcessor::OptimizationFlags)