summaryrefslogtreecommitdiffstats
path: root/libs/hwui/GradientCache.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-02-05 10:12:38 -0800
committerChris Craik <ccraik@google.com>2015-02-06 13:42:25 -0800
commit117bdbcfa3e8306dad21e7e01fa71b00cdfa7265 (patch)
treeaa54e4a5538818cd946bbd6e7eb771b83d0cfebd /libs/hwui/GradientCache.cpp
parent34725687748cc2b4ace2bdb49becfdcd569e9a5d (diff)
downloadframeworks_base-117bdbcfa3e8306dad21e7e01fa71b00cdfa7265.zip
frameworks_base-117bdbcfa3e8306dad21e7e01fa71b00cdfa7265.tar.gz
frameworks_base-117bdbcfa3e8306dad21e7e01fa71b00cdfa7265.tar.bz2
Glop ColorFilter & VertexBuffer support, initial enable
Enables Glop rendering for supported Rects and VertexBuffers Also removes unused Query object Change-Id: Ibe227bc362685a153159f75077664f0947764e06
Diffstat (limited to 'libs/hwui/GradientCache.cpp')
-rw-r--r--libs/hwui/GradientCache.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/libs/hwui/GradientCache.cpp b/libs/hwui/GradientCache.cpp
index 416b0b3..fb4c785 100644
--- a/libs/hwui/GradientCache.cpp
+++ b/libs/hwui/GradientCache.cpp
@@ -62,9 +62,12 @@ int GradientCacheEntry::compare(const GradientCacheEntry& lhs, const GradientCac
// Constructors/destructor
///////////////////////////////////////////////////////////////////////////////
-GradientCache::GradientCache():
- mCache(LruCache<GradientCacheEntry, Texture*>::kUnlimitedCapacity),
- mSize(0), mMaxSize(MB(DEFAULT_GRADIENT_CACHE_SIZE)) {
+GradientCache::GradientCache(Extensions& extensions)
+ : mCache(LruCache<GradientCacheEntry, Texture*>::kUnlimitedCapacity)
+ , mSize(0)
+ , mMaxSize(MB(DEFAULT_GRADIENT_CACHE_SIZE))
+ , mUseFloatTexture(extensions.hasFloatTextures())
+ , mHasNpot(extensions.hasNPot()){
char property[PROPERTY_VALUE_MAX];
if (property_get(PROPERTY_GRADIENT_CACHE_SIZE, property, nullptr) > 0) {
INIT_LOGD(" Setting gradient cache size to %sMB", property);
@@ -76,16 +79,6 @@ GradientCache::GradientCache():
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
mCache.setOnEntryRemovedListener(this);
-
- const Extensions& extensions = Extensions::getInstance();
- mUseFloatTexture = extensions.hasFloatTextures();
- mHasNpot = extensions.hasNPot();
-}
-
-GradientCache::GradientCache(uint32_t maxByteSize):
- mCache(LruCache<GradientCacheEntry, Texture*>::kUnlimitedCapacity),
- mSize(0), mMaxSize(maxByteSize) {
- mCache.setOnEntryRemovedListener(this);
}
GradientCache::~GradientCache() {