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

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: Fixed GrPaint unintialized bool 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 | « gyp/ports.gyp ('k') | include/gpu/GrPaint.h » ('j') | no next file with comments »
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 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;
« no previous file with comments | « gyp/ports.gyp ('k') | include/gpu/GrPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698