aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPrimitiveProcessor.h
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-01-23 14:06:50 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 21:29:10 +0000
commit27059d36d63284b1af2c25e0e5a52c17485c54d7 (patch)
treed2a8bb6c085dec3d800dd0f9922412ddf968ff94 /src/gpu/GrPrimitiveProcessor.h
parent80747ef591ff3c09c2b610eb21258132d1ff4ef5 (diff)
ccpr: Use primitive restart feature on ARM
Bug: skia: Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01 Reviewed-on: https://skia-review.googlesource.com/98180 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPrimitiveProcessor.h')
-rw-r--r--src/gpu/GrPrimitiveProcessor.h11
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;
};