Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: include/gpu/GrFragmentProcessor.h

Issue 2114993002: GrFP can express distance vector field req., program builder declares variable for it (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-bevel-api-change
Patch Set: Removed DVF from prog builder key, not necessary Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/gpu/GrPaint.h » ('j') | src/core/SkNormalSource.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrFragmentProcessor.h
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index bda132eec97e3b7241d0f815412fc15ff85c1142..9fa6fa3957ec56f0a5c4e932a24b24a6d322d8ba 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;
« no previous file with comments | « no previous file | include/gpu/GrPaint.h » ('j') | src/core/SkNormalSource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698