mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This patch adds caching for both layouts and for HarfBuzz face objects. The granularity of the cache for layouts is words, so it splits the input string at word boundaries (using a heuristic). There are is also some refactoring to reduce the amount of allocation and copying, and movement towards properly supporting contexts. The size of the caches is a fixed number of entries; thus, it is possible to consume a large amount of memory by filling the cache with lots of large strings. This should be refined towards a scheme that bounds the total memory used by the cache. This patch fixes bug 15237293 "Regression: Measure performance is significantly slower with minikin". Change-Id: Ie8176857e2d78656ce5479a7c04969819ef2718d
51 lines
1.3 KiB
Makefile
51 lines
1.3 KiB
Makefile
# Copyright (C) 2013 The Android Open Source Project
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
|
include external/stlport/libstlport.mk
|
|
|
|
LOCAL_SRC_FILES := \
|
|
AnalyzeStyle.cpp \
|
|
CmapCoverage.cpp \
|
|
CssParse.cpp \
|
|
FontCollection.cpp \
|
|
FontFamily.cpp \
|
|
Layout.cpp \
|
|
MinikinInternal.cpp \
|
|
MinikinRefCounted.cpp \
|
|
MinikinFontFreeType.cpp \
|
|
SparseBitSet.cpp
|
|
|
|
LOCAL_MODULE := libminikin
|
|
|
|
LOCAL_C_INCLUDES += \
|
|
external/harfbuzz_ng/src \
|
|
external/freetype/include \
|
|
external/icu4c/common \
|
|
frameworks/minikin/include
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
libharfbuzz_ng \
|
|
libft2 \
|
|
liblog \
|
|
libpng \
|
|
libz \
|
|
libstlport \
|
|
libicuuc \
|
|
libutils
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|