diff options
Diffstat (limited to 'src/gpu/GrPrimitiveProcessor.h')
-rw-r--r-- | src/gpu/GrPrimitiveProcessor.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gpu/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h index 22c65fa249..d9852c0634 100644 --- a/src/gpu/GrPrimitiveProcessor.h +++ b/src/gpu/GrPrimitiveProcessor.h @@ -89,6 +89,8 @@ public: // we put these calls on the base class to prevent having to cast virtual bool willUseGeoShader() const = 0; + bool willUsePrimitiveRestart() const { return fWillUsePrimitiveRestart; } + /** * Computes a transformKey from an array of coord transforms. Will only look at the first * <numCoords> transforms in the array. @@ -138,6 +140,8 @@ protected: return fAttribs.back(); } + void setWillUsePrimitiveRestart() { fWillUsePrimitiveRestart = true; } + private: void addPendingIOs() const override { GrResourceIOProcessor::addPendingIOs(); } void removeRefs() const override { GrResourceIOProcessor::removeRefs(); } @@ -145,9 +149,10 @@ private: void notifyRefCntIsZero() const final {} virtual bool hasExplicitLocalCoords() const = 0; - SkSTArray<8, Attribute> fAttribs; - int fVertexStride = 0; - int fInstanceStride = 0; + SkSTArray<8, Attribute> fAttribs; + int fVertexStride = 0; + int fInstanceStride = 0; + bool fWillUsePrimitiveRestart = false; typedef GrProcessor INHERITED; }; |