diff options
author | Raph Levien <raph@google.com> | 2014-05-21 08:37:49 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2014-05-27 15:39:33 +0000 |
commit | 4d4e6bc8118d15542f1f2a9218f0f7a91a29474f (patch) | |
tree | cdfd772d61a6eb71d7268f5d278e82202a247769 /include/minikin/MinikinFont.h | |
parent | d973b3926b3a34c19d3d6f309fae1138e782e4dc (diff) | |
download | android_frameworks_minikin-4d4e6bc8118d15542f1f2a9218f0f7a91a29474f.tar.gz android_frameworks_minikin-4d4e6bc8118d15542f1f2a9218f0f7a91a29474f.tar.bz2 android_frameworks_minikin-4d4e6bc8118d15542f1f2a9218f0f7a91a29474f.zip |
Caching for layouts and harfbuzz faces
This patch adds caching for both layouts and for HarfBuzz face objects.
The granularity of the cache for layouts is words, so it splits the
input string at word boundaries (using a heuristic). There are is also
some refactoring to reduce the amount of allocation and copying, and
movement towards properly supporting contexts.
The size of the caches is a fixed number of entries; thus, it is
possible to consume a large amount of memory by filling the cache with
lots of large strings. This should be refined towards a scheme that
bounds the total memory used by the cache.
This patch fixes bug 15237293 "Regression: Measure performance is
significantly slower with minikin".
Change-Id: Ie8176857e2d78656ce5479a7c04969819ef2718d
Diffstat (limited to 'include/minikin/MinikinFont.h')
-rw-r--r-- | include/minikin/MinikinFont.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/minikin/MinikinFont.h b/include/minikin/MinikinFont.h index 568f19d..dbb89f8 100644 --- a/include/minikin/MinikinFont.h +++ b/include/minikin/MinikinFont.h @@ -27,6 +27,7 @@ namespace android { class MinikinFont; // Possibly move into own .h file? +// Note: if you add a field here, also update LayoutCacheKey struct MinikinPaint { MinikinFont *font; float size; |