History log of /frameworks/minikin/tests/MinikinFontForTest.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6c60831cfce24b0749f50f37231e0a56d8fd4b85 11-Apr-2016 Seigo Nonaka <nona@google.com> Fix minikin_unittests

This CL fixes following test cases in minikin_tests
- FontFamilyTest.hasVariationSelectorTest
- HbFontCacheTest.getHbFontLockedTest
- HbFontCacheTest.purgeCacheTest

For the fix of FontFamilyTest.hasVariationSelectorTest, removing virtual
from GetUniqueId() in MinikinFont. After [1], MinikinFont's destructor
started calling purgeHbCache() which calls virtual method,
MinikinFont::GetUniqueId(). Fortunately, the SkTypeface::uniqueID()
returns just internal value, so we can store it at the construction time
and use it instead of calling SkTypeface::uniqueID() every time.

This patch also changes purgeHbFont to purgeHbFontLocked, as all uses of
it were already under global mutex. This change avoids deadlock on
explicit unref, as when invoked by a Java finalizer from the Java object
that holds a reference to the font.

Some of the tests needed to change to using the ref counting protocol
rather than explicitly destructing font objects, as well.

[1] 9afcc6e2bd4d89e4e1deb6e18c3c4daca4e114fd

Bug: 28105730
Bug: 28105688
Change-Id: Ie5983c4869147dacabdca81af1605066cd680b3f
/frameworks/minikin/tests/MinikinFontForTest.h
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/tests/MinikinFontForTest.h
6f9966ea7c1910fd780cf7779cc59701c9b98a2b 12-Dec-2015 Seigo Nonaka <nona@google.com> Introduce multiple language based font fallback.

The motivation of this CL is enhance the font fallback score design
to support multiple language font fallback.

This CL contains following changes:
- Break language based font score into two: script-based score and
primary-language-based score.
- The primary-language-based score is 0 if the script-based score is 0.
If the script-based score is not 0 and the primary language is the
as same as the requested one, the font gets an extra score of 1.
- The language score gets a higher multiplier for languages higher in
the locale list.

Bug: 25122318
Bug: 26168983
Change-Id: Ib999997a88e6977e341f4c325e2a1b41a59db2d5
/frameworks/minikin/tests/MinikinFontForTest.h
210dfa01db0defb3c23b60c446e97b1ee6f1287e 13-Oct-2015 Seigo Nonaka <nona@google.com> Remove MinikinFont::GetGlyph interface.

MinikinFont:GetGlyph is no longer used.
No behavior chnages are expected with this CL.

Change-Id: I13398503841ac06f930b04815017d4b33338efa1
/frameworks/minikin/tests/MinikinFontForTest.h
1c2bd209d11e59ea3a31d49ec4e97725fd711bea 16-Sep-2015 Seigo Nonaka <nona@google.com> Introduce unit tests for FontCollection::itemize.

Introduced tests depend on installed font list in running device.
I verified these test passed on Nexus 5(hammerhead), Nexus 6(shamu)
and Nexus 9(volantis).

Bug: 11256006
Bug: 17759267
Change-Id: I6f806370e17f6c6d3dad8df0cb70bb475a827873
/frameworks/minikin/tests/MinikinFontForTest.h