diff options
author | Romain Guy <romainguy@google.com> | 2013-08-21 17:42:26 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-08-21 17:42:26 -0700 |
commit | 880d6fecfcc00529ff4df44670240fb20f5fba96 (patch) | |
tree | d5c18fa4a311cf91fb86917493c09b54b510af2a /libs/hwui | |
parent | c63d85a051008ae33b5417925d217bc47bddf6d5 (diff) | |
parent | b7db6d73a4a7fc2c2ec189780e1532cb0e2c638b (diff) | |
download | frameworks_base-880d6fecfcc00529ff4df44670240fb20f5fba96.zip frameworks_base-880d6fecfcc00529ff4df44670240fb20f5fba96.tar.gz frameworks_base-880d6fecfcc00529ff4df44670240fb20f5fba96.tar.bz2 |
am b7db6d73: am e0a2435c: Merge "Properly account for created paths in the cache" into klp-dev
* commit 'b7db6d73a4a7fc2c2ec189780e1532cb0e2c638b':
Properly account for created paths in the cache
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/PathCache.cpp | 5 | ||||
-rw-r--r-- | libs/hwui/thread/TaskManager.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index 70ab6e7..25afe63 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -283,6 +283,11 @@ void PathCache::generateTexture(const PathDescription& entry, SkBitmap* bitmap, mCache.put(entry, texture); } } else { + // It's okay to add a texture that's bigger than the cache since + // we'll trim the cache later when addToCache is set to false + if (!addToCache) { + mSize += size; + } texture->cleanup = true; } } diff --git a/libs/hwui/thread/TaskManager.cpp b/libs/hwui/thread/TaskManager.cpp index c8bfd9c..189895c 100644 --- a/libs/hwui/thread/TaskManager.cpp +++ b/libs/hwui/thread/TaskManager.cpp @@ -29,7 +29,7 @@ namespace uirenderer { TaskManager::TaskManager() { // Get the number of available CPUs. This value does not change over time. - int cpuCount = sysconf(_SC_NPROCESSORS_ONLN); + int cpuCount = sysconf(_SC_NPROCESSORS_CONF); for (int i = 0; i < cpuCount / 2; i++) { String8 name; |