History log of /frameworks/minikin/tests/unittest/CmapCoverageTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9196194d76e4325c5bb0c23f22a5787a717067ed 18-Mar-2017 Seigo Nonaka <nona@google.com> Compute SparseBitSet for cmap format 14 subtables.

By computing cmap format 14 subtables similar to cmap format 4 or 12,
there are following benefits:
- FontCollection::hasVariationSelector becomes 70x faster for the worst
case, 10x faster for the normal case.
- FontFamily::hasGlyph becomes lock-free.
- FontCollection::itemize becomes 2x faster than before for some cases.

On the other hand, following negative things happen:
- Initial FontFamily construction takes 2.5x longer than before, but this
only happens in Zygote and should not happen at application launch time.
- FontFamily construction from buffer takes longer time than before but
it is still around 800µs.
- Consumes additionally memory (about 30kB for NotoSansCJK-Regular.ttc
of ttc index 0, 2.5kB for NotoColorEmoji.ttf), but this is shared across
all applications. No additional memory is necessary if the font doesn't
support variation sequences.

Bug: 36401726
Test: minikin_tests passed
Test: minikin_stress_tests passed
Test: android.graphics.cts.PaintTest passed
Merged-In: I3ebc9ad5050fb9ab6283810d31ae8d13af168ec5
Change-Id: Ia84c4b56aed35a899223e33c1a4a15734de58c33
/frameworks/minikin/tests/unittest/CmapCoverageTest.cpp
818fbee83a72ca86f64527eb90b2f15ec9b28504 14-Apr-2017 Seigo Nonaka <nona@google.com> Reduce heap memory in minikin.

This patch reduces about 73 kB memory.
The original SparseBitSet could contain full 32bit integers, but all of
that is not necessary for Unicode code points. By reducing the supported
range to up to Unicode maximum, U+10FFFF, we can save extra memory.

SparseBitSet holds 256-bit sliced pages and indices of them.
Previously, we needed to hold up to 2^24-1 pages for keeping 32-bit
integers.

This CL limits the number of pages to 2^16-1 (65535), so that
SparseBitSet only supports 24-bit integers now, but this is sufficient
for keeping all Unicode code points. With this change, we can change the
index integer type from uint32_t to uint16_t.

Bug: 37357593
Test: minikin_tests passes
Change-Id: I462cc27927752c942ac5da0bf303a5afb81b87a3
/frameworks/minikin/tests/unittest/CmapCoverageTest.cpp
db1b6cb7765091453d9b4dc7f6c2fb4d7123ab11 25-Mar-2017 Seigo Nonaka <nona@google.com> Support cmap tables with platform ID == 0

Some fonts don't have cmap subtables of Microsoft Platform ID (3) and
only have cmap subtables of Unicode Platform ID (0).

Bug: 32505843
Test: minikin_unittest passed
Test: android.graphics.cts.TypefaceTest passed
Change-Id: I24aa49860790c0ae8d8e578efd728b95ec0f93ae
/frameworks/minikin/tests/unittest/CmapCoverageTest.cpp