Loading libs/hwui/LayerCache.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -162,7 +162,7 @@ bool LayerCache::put(Layer* layer) { // TODO: Use an LRU while (mSize + size > mMaxSize) { size_t position = 0; #if LAYER_REMOVE_BIGGEST #if LAYER_REMOVE_BIGGEST_FIRST position = mCache.size() - 1; #endif Layer* victim = mCache.itemAt(position).mLayer; Loading libs/hwui/LayerCache.h +1 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "Debug.h" #include "Layer.h" #include "Properties.h" #include "utils/SortedList.h" namespace android { Loading @@ -28,11 +29,6 @@ namespace uirenderer { // Defines /////////////////////////////////////////////////////////////////////////////// // Indicates whether to remove the biggest layers first, or the smaller ones #define LAYER_REMOVE_BIGGEST 0 // Textures used by layers must have dimensions multiples of this number #define LAYER_SIZE 64 // Debug #if DEBUG_LAYERS #define LAYER_LOGD(...) LOGD(__VA_ARGS__) Loading libs/hwui/Properties.h +6 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,12 @@ // If turned on, text is interpreted as glyphs instead of UTF-16 #define RENDER_TEXT_AS_GLYPHS 1 // Indicates whether to remove the biggest layers first, or the smaller ones #define LAYER_REMOVE_BIGGEST_FIRST 0 // Textures used by layers must have dimensions multiples of this number #define LAYER_SIZE 64 /** * Debug level for app developers. */ Loading Loading
libs/hwui/LayerCache.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -162,7 +162,7 @@ bool LayerCache::put(Layer* layer) { // TODO: Use an LRU while (mSize + size > mMaxSize) { size_t position = 0; #if LAYER_REMOVE_BIGGEST #if LAYER_REMOVE_BIGGEST_FIRST position = mCache.size() - 1; #endif Layer* victim = mCache.itemAt(position).mLayer; Loading
libs/hwui/LayerCache.h +1 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "Debug.h" #include "Layer.h" #include "Properties.h" #include "utils/SortedList.h" namespace android { Loading @@ -28,11 +29,6 @@ namespace uirenderer { // Defines /////////////////////////////////////////////////////////////////////////////// // Indicates whether to remove the biggest layers first, or the smaller ones #define LAYER_REMOVE_BIGGEST 0 // Textures used by layers must have dimensions multiples of this number #define LAYER_SIZE 64 // Debug #if DEBUG_LAYERS #define LAYER_LOGD(...) LOGD(__VA_ARGS__) Loading
libs/hwui/Properties.h +6 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,12 @@ // If turned on, text is interpreted as glyphs instead of UTF-16 #define RENDER_TEXT_AS_GLYPHS 1 // Indicates whether to remove the biggest layers first, or the smaller ones #define LAYER_REMOVE_BIGGEST_FIRST 0 // Textures used by layers must have dimensions multiples of this number #define LAYER_SIZE 64 /** * Debug level for app developers. */ Loading