summaryrefslogtreecommitdiffstats
path: root/sample/MinikinSkia.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix minikin_unittestsSeigo Nonaka2016-04-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update minikin/sample code to use new GetTableRaph Levien2016-04-081-2/+1
| | | | | | | We changed the signature of the MinikinFont::GetTable method. This patch updates the sample code, and fixes the build. Change-Id: I1977be868bf7636986fc802915f3dd54c418a73a
* Remove MinikinFont::GetGlyph interface.Seigo Nonaka2015-10-151-3/+1
| | | | | | | MinikinFont:GetGlyph is no longer used. No behavior chnages are expected with this CL. Change-Id: I13398503841ac06f930b04815017d4b33338efa1
* Fix build breakage in sample codeRaph Levien2014-05-141-0/+3
| | | | | | | This updates the Skia sample implementation to implement GetBounds, but the FreeType implementation is NYI (to be fixed in future commit). Change-Id: I24eda14d5fb11c2a1e81394ad8c779de3292dd79
* A basket of features: itemization, bounds, refcountRaph Levien2014-05-121-0/+26
This patch improves script run itemization and also exposes metrics and bounds for layouts. In addition, there is a fair amount of internal cleanup, including ref counting, and making the MinikinFont abstraction strong enough to support both FreeType and Skia implementations. There is also a sample implementation using Skia, in the sample directory. As part of its functionality, his patch measures the bounds of the layout and gives access through Layout::GetBounds(). The corresponding method is not implemented in the FreeType-only implementation of MinikinFont, so that will probably have to be fixed. Change-Id: Ib1a3fe9d7c90519ac651fb4aa957848e4bb758ec