diff options
author | Raph Levien <raph@google.com> | 2016-04-12 15:27:17 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2016-04-12 15:27:17 -0700 |
commit | 879e8a3a479b2cedd05e652f082683a02aa57dcf (patch) | |
tree | e6f7a2b1e00af1c3faaa2e685eec69ddb381abe1 /include | |
parent | 9afcc6e2bd4d89e4e1deb6e18c3c4daca4e114fd (diff) | |
download | android_frameworks_minikin-879e8a3a479b2cedd05e652f082683a02aa57dcf.tar.gz android_frameworks_minikin-879e8a3a479b2cedd05e652f082683a02aa57dcf.tar.bz2 android_frameworks_minikin-879e8a3a479b2cedd05e652f082683a02aa57dcf.zip |
Clear mLineWidths in LineBreaker::finish()
There was the possibility of stale indents from previous invocations
persisting in the mLineWidths across multiple invocations. This patch
clears them.
Bug: 28090810
Change-Id: I3621dfbe983512046289373711709aeade52eab4
Diffstat (limited to 'include')
-rw-r--r-- | include/minikin/LineBreaker.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/minikin/LineBreaker.h b/include/minikin/LineBreaker.h index e28f11d..1d81404 100644 --- a/include/minikin/LineBreaker.h +++ b/include/minikin/LineBreaker.h @@ -69,6 +69,9 @@ class LineWidths { } return width; } + void clear() { + mIndents.clear(); + } private: float mFirstWidth; int mFirstWidthLineCount; |