diff options
author | 2018-07-11 20:03:13 +0000 | |
---|---|---|
committer | 2018-07-11 20:03:19 +0000 | |
commit | ba383208043a69666ada6c22757e656927fd6bfc (patch) | |
tree | 8bd47a9fc8ac1d120477941e82575cb448ade186 /src/core/SkGlyphCache.cpp | |
parent | 143cf8e5994c54aa8c1b721f7af1d3fc9fd83602 (diff) |
Revert "Use simple buffers instead of vectors"
This reverts commit b188da121c1575caa6b0b9755e3f80a6b5e44611.
Reason for revert: Patch on a rollback
Original change's description:
> Use simple buffers instead of vectors
>
> Start using simple buffers, these will be used for
> multiple runs latter on.
>
> Change-Id: I8dadbed036b7a60d708c49b84bb5e3bb3710f704
> Reviewed-on: https://skia-review.googlesource.com/140578
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=mtklein@google.com,herb@google.com
Change-Id: I51d9ad9bc0fd7efb93e5db4dc504d8dc31e7cfb4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/140802
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkGlyphCache.cpp')
-rw-r--r-- | src/core/SkGlyphCache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp index 30f7def312..61e01af894 100644 --- a/src/core/SkGlyphCache.cpp +++ b/src/core/SkGlyphCache.cpp @@ -131,9 +131,9 @@ const SkGlyph& SkGlyphCache::getGlyphIDMetrics(uint16_t glyphID, SkFixed x, SkFi } void SkGlyphCache::getAdvances(SkSpan<const SkGlyphID> glyphIDs, SkPoint advances[]) { - for (auto glyphID : glyphIDs) { - auto glyph = this->getGlyphIDAdvance(glyphID); - *advances++ = SkPoint::Make(glyph.fAdvanceX, glyph.fAdvanceY); + for (ptrdiff_t i = 0; i < glyphIDs.size(); i++) { + auto glyph = this->getGlyphIDAdvance(glyphIDs[i]); + advances[i] = SkPoint::Make(glyph.fAdvanceX, glyph.fAdvanceY); } } |