Index: include/gpu/GrProcessor.h |
diff --git a/include/gpu/GrProcessor.h b/include/gpu/GrProcessor.h |
index 5afd8ea3882b0ee9086945a6648658cca409a215..d9f422469d61b10bea152147ec01d809b1efb6d6 100644 |
--- a/include/gpu/GrProcessor.h |
+++ b/include/gpu/GrProcessor.h |
@@ -84,7 +84,8 @@ public: |
*/ |
enum RequiredFeatures { |
kNone_RequiredFeatures = 0, |
- kFragmentPosition_RequiredFeature = 1 |
+ kFragmentPosition_RequiredFeature = 1, |
bsalomon
2016/03/01 14:28:55
can we make this 1 << 0? Or make them 0x1 and 0x2?
Chris Dalton
2016/03/01 20:37:47
Sure
Chris Dalton
2016/03/07 16:09:38
Done.
|
+ kSampleLocations_RequiredFeature = 1 << 1 |
}; |
GR_DECL_BITFIELD_OPS_FRIENDS(RequiredFeatures); |
@@ -122,11 +123,12 @@ protected: |
bool hasSameTextureAccesses(const GrProcessor&) const; |
/** |
- * If the prcoessor will generate a backend-specific processor that will read the fragment |
- * position in the FS then it must call this method from its constructor. Otherwise, the |
- * request to access the fragment position will be denied. |
+ * If the prcoessor will generate code that uses platform specific built-in features, then it |
+ * must call these methods from its constructor. Otherwise, requests to use these features will |
+ * be denied. |
*/ |
void setWillReadFragmentPosition() { fRequiredFeatures |= kFragmentPosition_RequiredFeature; } |
+ void setWillUseSampleLocations() { fRequiredFeatures |= kSampleLocations_RequiredFeature; } |
void combineRequiredFeatures(const GrProcessor& other) { |
fRequiredFeatures |= other.fRequiredFeatures; |