summaryrefslogtreecommitdiffstats
path: root/include/minikin/CmapCoverage.h
diff options
context:
space:
mode:
authorSeigo Nonaka <nona@google.com>2016-02-02 15:42:37 +0900
committerSeigo Nonaka <nona@google.com>2016-02-17 16:01:20 +0900
commit6b1c227da6492a435f0341d7fe95d9992669920e (patch)
tree81094b267d539ac17218ae9b9b2cb9472f5114af /include/minikin/CmapCoverage.h
parent070633ad657e20344fa9d9e7ab79ebb311365aa9 (diff)
downloadandroid_frameworks_minikin-6b1c227da6492a435f0341d7fe95d9992669920e.tar.gz
android_frameworks_minikin-6b1c227da6492a435f0341d7fe95d9992669920e.tar.bz2
android_frameworks_minikin-6b1c227da6492a435f0341d7fe95d9992669920e.zip
Improve Paint.measureText and Paint.hasGlyph for variation sequences.
Before this patch, the font fallback chain iterated all installed font families if a variation selector was specified. This CL narrows down the range of iteration. To decide the font family for the variation sequence, we need to search for both the variation sequence and its base code point. The new range of the iteration is a union of them. With this change, the running time of Paint.hasGlyph for the variation sequence improves 50% and the running time of Paint.measureText for the variation sequence improves 40% for the large text case on Nexus 6 userdebug. Bug: 26784699 Bug: 11750374 Change-Id: Iced1349e3ca750821d8882c551551f65bb569794
Diffstat (limited to 'include/minikin/CmapCoverage.h')
-rw-r--r--include/minikin/CmapCoverage.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/minikin/CmapCoverage.h b/include/minikin/CmapCoverage.h
index 7054e31..56abac7 100644
--- a/include/minikin/CmapCoverage.h
+++ b/include/minikin/CmapCoverage.h
@@ -23,7 +23,8 @@ namespace android {
class CmapCoverage {
public:
- static bool getCoverage(SparseBitSet &coverage, const uint8_t* cmap_data, size_t cmap_size);
+ static bool getCoverage(SparseBitSet &coverage, const uint8_t* cmap_data, size_t cmap_size,
+ bool* has_cmap_format14_subtable);
};
} // namespace android