From 27059d36d63284b1af2c25e0e5a52c17485c54d7 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Tue, 23 Jan 2018 14:06:50 -0700 Subject: ccpr: Use primitive restart feature on ARM Bug: skia: Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01 Reviewed-on: https://skia-review.googlesource.com/98180 Commit-Queue: Chris Dalton Reviewed-by: Brian Salomon --- src/gpu/GrPrimitiveProcessor.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/gpu/GrPrimitiveProcessor.h') 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 * 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; }; -- cgit v1.2.3