b7b0b3ad53
That makes layout phase 10 times faster (since the shaping takes 90% of it). LRU cache is attached to the FontCollection object and has the same life time. Currently it has hardcoded limit on the entry numbers (128). One the number reached, the least recently used element is removed from the cache to free the space for a new one. Change-Id: I597e334422614e33715d7a9ed13acf7b1f9cd0e4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230755 Commit-Queue: Julia Lavrova <jlavrova@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Julia Lavrova <jlavrova@google.com>
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
# Copyright 2019 Google LLC.
|
|
|
|
# Things are easiest for everyone if these source paths are absolute.
|
|
_src = get_path_info("src", "abspath")
|
|
_include = get_path_info("include", "abspath")
|
|
_utils = get_path_info("utils", "abspath")
|
|
|
|
skparagraph_public = [
|
|
"$_include/ParagraphStyle.h",
|
|
"$_include/TextStyle.h",
|
|
"$_include/TextShadow.h",
|
|
"$_include/FontCollection.h",
|
|
"$_include/Paragraph.h",
|
|
"$_include/ParagraphBuilder.h",
|
|
"$_include/ParagraphCache.h",
|
|
"$_include/DartTypes.h",
|
|
"$_include/TypefaceFontProvider.h",
|
|
"$_utils/TestFontCollection.h",
|
|
]
|
|
|
|
skparagraph_sources = [
|
|
"$_src/FontCollection.cpp",
|
|
"$_src/FontResolver.h",
|
|
"$_src/FontResolver.cpp",
|
|
"$_src/Iterators.h",
|
|
"$_src/ParagraphBuilderImpl.h",
|
|
"$_src/ParagraphBuilderImpl.cpp",
|
|
"$_src/ParagraphCache.cpp",
|
|
"$_src/ParagraphImpl.h",
|
|
"$_src/ParagraphImpl.cpp",
|
|
"$_src/ParagraphStyle.cpp",
|
|
"$_src/Run.h",
|
|
"$_src/Run.cpp",
|
|
"$_src/TextLine.h",
|
|
"$_src/TextLine.cpp",
|
|
"$_src/TextShadow.cpp",
|
|
"$_src/TextStyle.cpp",
|
|
"$_src/TextWrapper.h",
|
|
"$_src/TextWrapper.cpp",
|
|
"$_src/TypefaceFontProvider.cpp",
|
|
"$_utils/TestFontCollection.cpp",
|
|
]
|
|
|
|
skparagraph_utils = [
|
|
"$_utils/TestFontCollection.h",
|
|
"$_utils/TestFontCollection.cpp",
|
|
]
|