History log of /frameworks/minikin/libs/minikin/MinikinInternal.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
722841005f805a5023fd7edefc4016968d1fae10 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
Change-Id: I3ebc9ad5050fb9ab6283810d31ae8d13af168ec5
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
bab3b98ceb29fa3fc5d8832284312859d7f32cc7 31-Mar-2017 Roozbeh Pournader <roozbeh@google.com> Override the bidi properties of new emojis

Test: new Minikin tests are added, and pass
Bug: 32952475
Change-Id: Ibcae60d18d0cd5efd7556aaf58a716b6b59c8ee0
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
754913bd274b32ad66c1dfcf3bd592bb6c8c01bd 17-Mar-2017 Roozbeh Pournader <roozbeh@google.com> Update Minikin to use ICU's emoji data

Certain differences are still needed, since ICU appears to support
Emoji 4.0 only, while we need Emoji 5.0. But the bulk of the data is
now carried by ICU.

We no longer need the script that generates the tables, so that's
also removed.

Test: Comprehensive unit tests added.
Bug: 27365282
Bug: 30874706
Change-Id: I011443fbca9bb202deff7fffb40043f89e1f1fb1
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
0480d6daa40ecd83d8d23443fe794d699505fb0e 16-Mar-2017 Roozbeh Pournader <roozbeh@google.com> Update emoji character data in Minikin

Update emoji character data to Unicode 10.0 / Emoji 5.0 (which also
removes U+1F93B MODERN PENATHLON from the emoji base letters).

Also add unit tests for line breaking for new characters (based on
earlier work by Seigo Nonaka).

Test: All new and existing unit tests pass;
Test: Manually tested line breaking of new emojis in TextView.

Bug: 28364892
Bug: 28678294
Bug: 30874706
Change-Id: I367cdab09187dc08a66a3112a5181a2b7fb338a5
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
fd4124c53399581dd94eac5a9749bc07b474a294 14-Mar-2017 Seigo Nonaka <nona@google.com> Revert "Use std::mutex instead of android::Mutex"

This reverts commit 62ad565335d4774bc5b31ced462e92566b48d197.

Bug: 36208043
Test: N/A

Change-Id: I165ab7a0718ea50a8034adb6277809e271fd762c
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
62ad565335d4774bc5b31ced462e92566b48d197 21-Feb-2017 Seigo Nonaka <nona@google.com> Use std::mutex instead of android::Mutex

This CL includes:
- Stop using utils/Mutex and use std::mutex instead.
- Stop using utils/Singleton.

Test: minikin_tests passed
Change-Id: Ib3f75b83397a546472bb5f91e066e44506e78263
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
dfbc6e374259f9d81940b5195ac013b02429af27 10-Feb-2017 Seigo Nonaka <nona@google.com> Remove MinikinRefCounted and use shared_ptr instead

Let's use shared_ptr since manual ref counting can be a bug-prone and
using the global mutex inside destructor is not useful for some time.

To remove raw pointer manipulation, needed to change Layout
constructors. Layout is no longer copyable and need to pass
FontCollection to constructor.

Bug: 28119474
Test: minikin_tests passed
Test: hwui_unit_tests passed
Test: No performance regression in minikin_perftest.
Change-Id: I8824593206ecba74cbc9731e298f045e1ae442a3
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
77baca2bda0f8d313f48af2df0b397d5de94a132 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of dff2a9d to master

Test: compile
Bug: 30465923
Change-Id: I9bcbf910e90a9160ed2fd2f75c5d72dba6ad6fcf
39ab40115fae6d0c948e435233b3dd997ee7d8e5 09-Jan-2017 Mark Salyzyn <salyzyn@google.com> minikin: use log/log.h when utilizing ALOG macros

Use log/log.h to harden code against liblog changes.

Test: compile
Bug: 30465923
Change-Id: I3dea82e76d28d9ef52d7c0f11e038c4298863eb9
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
32c12c0ac825453f4c3bba07718cfe684ec90bec 28-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 2377a00 to master

Test: build
Bug: 26552300
Bug: 31289077
Change-Id: I6181ae7e84f9bdcbed50841c70d07f6906a10eb7
555d84c6f98eafcbe677cdcb8e9605760acd8ce5 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> minikin: Replace cutils/log.h with android/log.h or log/log.h

- replace cutils/log.h with android/log.h (main buffer logging)
- replace cutils/log.h with log.log.h (+SafetyNet logging)
- define LOG_TAG before use.

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7a4803dd66f31b7103e09e5ff5b8fa523fa0fd60
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
c2642f9a33b640e0ad25b17dc6f9d0734297166a 30-Jun-2016 Seigo Nonaka <nona@google.com> Treat U+2695, U+2640, U+2642 as emoji characters.

Bug: 29885295
Change-Id: I1bf191a46d05e7099265d863bae0523c50817d0b
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
1946f48e84fd67943dd2d09b3fee94028fbfe762 30-Jun-2016 Seigo Nonaka <nona@google.com> Treat U+2695, U+2640, U+2642 as emoji characters.

Bug: 29885295
Change-Id: I1bf191a46d05e7099265d863bae0523c50817d0b
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
14e2d136aaef271ba131f917cf5f27baa31ae5ad 09-Jun-2016 Seigo Nonaka <nona@google.com> Always use minikin namespace.

Here is a new policy of the namespace of minikin.
- All components should be in minikin namespace.
- All tests are also in minikin namespace and no anonymous namespace.

Bug: 29233740
Change-Id: I71a8a35049bb8d624f7a78797231e90fed1e2b8c
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
77f488345316fba46c271fc04bea470819ae1712 19-Apr-2016 Seigo Nonaka <nona@google.com> Do not break before and after ZWJ.

The emoji list is generated from external/unicode/emoji-data.txt

Bug: 28248662
Change-Id: Ie49b3782505665d62c24371ca23d317ae5e9c5f7
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
aaa4e3470270496e6eb80704eadecb2cb7c56bf0 07-Apr-2016 Raph Levien <raph@google.com> Avoid copying of font table data

The hb_font_t object holds on to tables of font data, acquired through
the MinikinFont::GetTable interface, which is based on copying data
into caller-owned buffers. Now that we're caching lots of hb_font_t's,
the cost of these buffers is significant.

This patch moves to a different interface, inspired by HarfBuzz's
hb_reference_table API, where the font can provide a pointer to the
actual font data (which will often be mmap'ed, so it doesn't even
consume physical RAM).

Bug: 27860101
Change-Id: Id766ab16a8d342bf7322a90e076e801271d527d4
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
1934c2c3cb2c93aa12f852f95915190f8ac81fac 27-Feb-2016 Raph Levien <raph@google.com> Fix wrong conditions in isEmojiBase

I computed ranges using low <= c || c <= high, should be &&.

Bug: 26829153
Change-Id: Ic1002d90b6a408a0b415f2d117d0e57adcbc2fa9
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
0036da164e3b25f1ac29c840c1fe15b03dc6677f 25-Feb-2016 Seigo Nonaka <nona@google.com> Use color font if skin tone is specified.

If skin tone is specified, the base emoji should be emoji style even
if it is text presentation default emoji.

This patch also removes wrong test case which expects default emoji
presentation but it is controlled by family order in /etc/fonts.xml
and there is no special logic for default presentation in minikin.
Thus the default presentation unit test should not be in minikin.

Bug: 27342346

Change-Id: I74a2b2feab4d559535049e368cfd833063cce81c
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
a6f5c46836090d1197e453c15c7f04c3c796a7ab 05-Jan-2016 Seigo Nonaka <nona@google.com> Fix race condition in Paint.hasGlyph()

The caller of FontFamily::hasVariationSelector needs to acquire the
lock before calling it, but FontCollection::hasVariationSelector
didn't acquire the lock. This caused a race condition.
This CL fixes this race condition.

Also, it turned out that assertMinikinLocked didn't assert even on
eng or userdebug device. This CL enables assertion on eng and userdebug
device since this assertion must be treated as bug.

BUG: 26323806

Change-Id: I9c4b1e1f09c6793e387fbdb8bb654cc0a13c65d5
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
fb0d396929e534a3686469b474d4f670864aa5ac 17-Sep-2015 Seigo Nonaka <nona@google.com> Extract hb_face_t object cache mechanism from Layout.cpp.

This CL does following things:
- Extract hb_face_t object cache mechanism from Layout.cpp to be able to
use it from other cpp file, especially from FontFamily.cpp.
To address Bug 11256006 and Bug 17759267, need to touch
hb_face_t from FontFamily.
- Make hb_face_t cache mechanism thread-safe.
- Add unit tests for HbFaceCache test cases.

Bug: 11256006
Bug: 17759267
Change-Id: Ic183634ef34326793bd9a32167236611d0af34d6
/frameworks/minikin/libs/minikin/MinikinInternal.cpp
b80c1f19c58b927820a8a24bf2218e5645724608 06-May-2014 Raph Levien <raph@google.com> Better refcounting and locking

All major externally accessible objects (especially FontFamily and
FontCollection) are now reference counted. In addition, there is a
global lock intended to make operations thread-safe.

WIP notice: in this version of the patch, not all external API entry
points are protected by the lock. That should be fixed.

Change-Id: I14106196e99eb101e8bf1bcb4b81359759d2086c
/frameworks/minikin/libs/minikin/MinikinInternal.cpp