Index: include/gpu/GrFragmentProcessor.h |
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h |
index b8ebeca30320b3f8a8e21e33e4a16395ef8d5bf2..4997885eebda8528666146af71adc4b69a7181cf 100644 |
--- a/include/gpu/GrFragmentProcessor.h |
+++ b/include/gpu/GrFragmentProcessor.h |
@@ -59,6 +59,7 @@ public: |
GrFragmentProcessor() |
: INHERITED() |
+ , fUsesDistanceVectorField(false) |
, fUsesLocalCoords(false) |
, fNumTexturesExclChildren(0) |
, fNumBuffersExclChildren(0) |
@@ -104,6 +105,9 @@ public: |
/** Do any of the coordtransforms for this processor require local coords? */ |
bool usesLocalCoords() const { return fUsesLocalCoords; } |
+ /** Does this FP need a vector to the nearest edge? */ |
+ bool usesDistanceVectorField() const { return fUsesDistanceVectorField; } |
+ |
/** Returns true if this and other processor conservatively draw identically. It can only return |
true when the two processor are of the same subclass (i.e. they return the same object from |
from getFactory()). |
@@ -167,6 +171,11 @@ protected: |
*/ |
virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0; |
+ /* Sub-classes should set this to true in their constructors if they need access to a distance |
+ * vector field to the nearest edge |
+ */ |
+ bool fUsesDistanceVectorField; |
+ |
private: |
void notifyRefCntIsZero() const final; |