diff options
author | Chris Craik <ccraik@google.com> | 2013-05-03 16:35:54 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-05-21 23:04:05 +0000 |
commit | 41541825bc90dac740e424cdd41a8c997e15cdb7 (patch) | |
tree | c06c9c12d2d67381014c22dca77f22478825e642 /libs/hwui/DisplayListRenderer.h | |
parent | 7f43674db314ab76e77cfd2a9488058eae144aa8 (diff) | |
download | frameworks_base-41541825bc90dac740e424cdd41a8c997e15cdb7.zip frameworks_base-41541825bc90dac740e424cdd41a8c997e15cdb7.tar.gz frameworks_base-41541825bc90dac740e424cdd41a8c997e15cdb7.tar.bz2 |
Use individual glyph positions to determine text bounds.
bug:8766924
Previously text bounds were calculated to be from 0 to totalAdvance in
the X, and from the font's top to bottom. These are incorrect,
especially in light of the font fallback mechanism.
Now, we calculate the bounds of the text as we layout each glyph.
Since these are much tighter bounds in the common case, this
significantly reduces the amount of clipping required (which in turn
enables more aggressive text merging).
Change-Id: I172e5466bf5975bf837af894a9964c41db538746
Diffstat (limited to 'libs/hwui/DisplayListRenderer.h')
-rw-r--r-- | libs/hwui/DisplayListRenderer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index db08921..85d6107 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -121,7 +121,8 @@ public: virtual status_t drawPosText(const char* text, int bytesCount, int count, const float* positions, SkPaint* paint); virtual status_t drawText(const char* text, int bytesCount, int count, float x, float y, - const float* positions, SkPaint* paint, float length, DrawOpMode drawOpMode); + const float* positions, SkPaint* paint, float totalAdvance, const Rect& bounds, + DrawOpMode drawOpMode); virtual status_t drawRects(const float* rects, int count, SkPaint* paint); |