This lays the groundwork for making SparseBitSet serializable.
FontFamily.addFont is only used when the FontFamily is constructed.
Thus, instead of calling FontFamily.addFont multiple time, passes
Font list to the constructor. By this change, FontFamily can be
immutable now.
By making FontFamily immutable, We can create FontFamily with
pre-calculated SparseBitSet.
Bug: 34042446
Test: minikin_tests has passed
Change-Id: I2576789fba6cb27687e920e2488e8bedbcf7d36f
This is 2nd attempt of Ifcd7a348d7fb5af081192899dbcdfc7fb4eebbf9
After Id766ab16a8d342bf7322a90e076e801271d527d4, GetTable is no longer
used in production due to poor performance and it is now only used in
tests. This CL removes GetTable interface from MinikinFont and update
tests code to use new interfaces, GetFontData, GetFontSize and
GetFontIndex.
Bug: 27860101
Test: Manually done
Change-Id: Ib48973ff25cdc61a4c666d28128266df0aaea83e
This reverts commit 1d525df4f0849a980c3204d5e4d41cbcc42f4ad6.
This causes a crash on Android Auto.
Bug: 32374752
Change-Id: Ia2ff77bf9a12351c6949f79ef6fa2d8016e3022d
After Id766ab16a8d342bf7322a90e076e801271d527d4, GetTable is no longer
used in production due to poor performance and it is now only used in
tests. This CL removes GetTable interface from MinikinFont and update
tests code to use new interfaces, GetFontData, GetFontSize and
GetFontIndex.
Bug: 27860101
Test: Manually done
Change-Id: Ifcd7a348d7fb5af081192899dbcdfc7fb4eebbf9
This CL introduces performance tests for FontCollection.
To support TTC file in /system/fonts, this CL also extends FontTestUtils
Bug:29142734
Change-Id: I9d8ad24ca55f61031b85623ab7c26234239e4f41
This fixes following three memory leaks in test utilities.
There is no problem in production code and this CL doesn't affect
any production behaviors.
- SkTypeface leaks due to forget calling SkSafeUnref in dtor.
- MinikinFontForTest leaks during constructing FontCollection.
- FontCollection leaks due to unnecessary AddRef.
Change-Id: I22e1e0307f1b2499296acb1aacc3ef66076a36e9
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
To add perftests and reuse some utility classes, reconstruct
test directory structure.
- Move unit tests from minikin/tests to minikin/tests/unittests
- Extract utilitiy classes to minikin/tests/utils which will be
used by perftests eventually.
Change-Id: I5026b177934e72ae67d362ee888302037da2f808