diff options
author | 2011-08-22 14:01:34 -0700 | |
---|---|---|
committer | 2011-08-22 14:01:34 -0700 | |
commit | 28d8ff6dbcc1b137131c70b72b4dbd211db7fbd9 (patch) | |
tree | 38a49302ac1bd3c05a85bb09ce26e5c5d45debd6 | |
parent | 6d97842849bed82affbd45251529f85f0958a6b8 (diff) |
Move constants to the correct header
Change-Id: Id4bd14f72487bd7156cd2e1930eaf97b47896273
-rw-r--r-- | libs/hwui/LayerCache.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/LayerCache.h | 6 | ||||
-rw-r--r-- | libs/hwui/Properties.h | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp index 0af017787305..52981259336e 100644 --- a/libs/hwui/LayerCache.cpp +++ b/libs/hwui/LayerCache.cpp @@ -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; diff --git a/libs/hwui/LayerCache.h b/libs/hwui/LayerCache.h index 63bb824c1281..c14c9caa9a5a 100644 --- a/libs/hwui/LayerCache.h +++ b/libs/hwui/LayerCache.h @@ -19,6 +19,7 @@ #include "Debug.h" #include "Layer.h" +#include "Properties.h" #include "utils/SortedList.h" namespace android { @@ -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__) diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h index 923978f67d7a..5bd0d4ffd217 100644 --- a/libs/hwui/Properties.h +++ b/libs/hwui/Properties.h @@ -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. */ |