diff options
author | cdalton <cdalton@nvidia.com> | 2015-10-05 15:56:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-05 15:56:34 -0700 |
commit | d1201058bf73a0a5c2e19c0cc142082b1827461c (patch) | |
tree | e297f50c6a506cd28da803f5dce8640728f06381 /src/gpu/batches | |
parent | cdd7907a3d7daf195f76e33af5dab20c83fe715f (diff) |
Make path range loading explicit
Requires the caller to explicitly preload paths within a range before
calling drawPaths. This allows us to remove the implicit lazy load,
thereby eliminating a redundant check on every redraw of a text blob.
BUG=skia:
Review URL: https://codereview.chromium.org/1382013002
Diffstat (limited to 'src/gpu/batches')
-rw-r--r-- | src/gpu/batches/GrDrawPathBatch.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/batches/GrDrawPathBatch.h b/src/gpu/batches/GrDrawPathBatch.h index bb76abb26b..91e0e41ee4 100644 --- a/src/gpu/batches/GrDrawPathBatch.h +++ b/src/gpu/batches/GrDrawPathBatch.h @@ -115,6 +115,10 @@ public: const GrPathRange* range() const { return fPathRange.get(); } + void loadGlyphPathsIfNeeded() { + fPathRange.get()->loadPathsIfNeeded<uint16_t>(fIndices.begin(), fIndices.count()); + } + static bool CanMerge(const GrPathRangeDraw& a, const GrPathRangeDraw& b) { return a.transformType() == b.transformType() && a.range() == b.range(); } |