Index: include/gpu/GrFragmentProcessor.h |
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h |
index 4b56fbf7287257214e13c26d1c665ea3ec9a2fbb..ffbf576dbe9f10f5afd47f59c8a09dd228dfb17d 100644 |
--- a/include/gpu/GrFragmentProcessor.h |
+++ b/include/gpu/GrFragmentProcessor.h |
@@ -65,6 +65,7 @@ public: |
GrFragmentProcessor() |
: INHERITED() |
+ , fUsesDistanceVectorField(false) |
, fUsesLocalCoords(false) |
, fNumTexturesExclChildren(0) |
, fNumBuffersExclChildren(0) |
@@ -110,6 +111,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()). |
@@ -173,6 +177,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; |