aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrShape.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-09-21 08:26:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-21 08:26:57 -0700
commit67fa4e31d885acf74514527a2cc3ed759c05d3c4 (patch)
treee9137e4ae93d2d93530352a281ac4c1ea1a36853 /src/gpu/GrShape.h
parent8eb43e5f63306a22570b977bbb69e4ec78432d24 (diff)
Make GrShape compute keys for short paths from path data instead of using the gen id.
Diffstat (limited to 'src/gpu/GrShape.h')
-rw-r--r--src/gpu/GrShape.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrShape.h b/src/gpu/GrShape.h
index 8f3be58702..074278cd86 100644
--- a/src/gpu/GrShape.h
+++ b/src/gpu/GrShape.h
@@ -34,6 +34,10 @@
*/
class GrShape {
public:
+ // Keys for paths may be extracted from the path data for small paths. Clients aren't supposed
+ // to have to worry about this. This value is exposed for unit tests.
+ static constexpr int kMaxKeyFromDataVerbCnt = 10;
+
GrShape() { this->initType(Type::kEmpty); }
explicit GrShape(const SkPath& path) : GrShape(path, GrStyle::SimpleFill()) {}