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/HbFontCache.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/HbFontCache.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/HbFontCache.cpp
|
39654bb6441b55f99341b613fc1194121b1e740b |
|
13-Feb-2017 |
Seigo Nonaka <nona@google.com> |
Call hb_font_set_variation if font variations are provided. Test: None Change-Id: I203d9ba7e1a1fcfdb10cd6a711d9a35136cbddd6
/frameworks/minikin/libs/minikin/HbFontCache.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/HbFontCache.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/HbFontCache.cpp
|
fd77b01ff2cb5c55f02929b5821ddc41aee0cd05 |
|
18-Oct-2016 |
Seigo Nonaka <nona@google.com> |
Clean Up: Removing unused interface GetTable from MinikinFont. 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
/frameworks/minikin/libs/minikin/HbFontCache.cpp
|
8d7ed7374b67fe16e8ce0815ec6f8d12c5126c9e |
|
25-Oct-2016 |
Seigo Nonaka <nona@google.com> |
Revert "Clean Up: Removing unused interface GetTable from MinikinFont." This reverts commit 1d525df4f0849a980c3204d5e4d41cbcc42f4ad6. This causes a crash on Android Auto. Bug: 32374752 Change-Id: Ia2ff77bf9a12351c6949f79ef6fa2d8016e3022d
/frameworks/minikin/libs/minikin/HbFontCache.cpp
|
1d525df4f0849a980c3204d5e4d41cbcc42f4ad6 |
|
18-Oct-2016 |
Seigo Nonaka <nona@google.com> |
Clean Up: Removing unused interface GetTable from MinikinFont. 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
/frameworks/minikin/libs/minikin/HbFontCache.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/HbFontCache.cpp
|
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/libs/minikin/HbFontCache.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/HbFontCache.cpp
|
9afcc6e2bd4d89e4e1deb6e18c3c4daca4e114fd |
|
07-Apr-2016 |
Raph Levien <raph@google.com> |
Purge hb font on Minikin font destruction This patch eagerly purges the corresponding hb_font_t object from the HbFontCache when the underlying MinikinFont is destroyed. After that, the key will no longer be accessed, so having the entry is wastes memory. Bug: 27251075 Bug: 27860101 Change-Id: I1b98016133fe3baf6525ac37d970a65ddccadb4f
/frameworks/minikin/libs/minikin/HbFontCache.cpp
|
89e80237bc27af084c9ff316d4f47abf426eced8 |
|
03-Feb-2016 |
Seigo Nonaka <nona@google.com> |
Improve Paint.hasGlyph performance by caching hb_font_t It turned out that hb_font_t creation is not a lightweight operation. Especially, Paint.hasGlyph creates hb_font_t for all existing fonts every time. To improve the performance, cache hb_font_t instead of hb_face_t. Note that to calculate horizontal advance, MinikinPaint needs to be associated with hb_font_t by calling hb_font_set_funcs. With this patch, hb_font_set_funcs may be called multiple times for the same hb_font_t object. However this is not an issue since MinikinPaint is unique during layout. Bug: 26784699 Change-Id: I516498ae9f0127d700fc9829327e9789845a1416
/frameworks/minikin/libs/minikin/HbFontCache.cpp
|