summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2014-06-02 16:27:04 -0700
committer Chris Craik <ccraik@google.com> 2014-06-10 01:53:17 +0000
commit05f3d6e5111fd08df5cd9aae2c3d28399dc0e7f5 (patch)
tree14df3cad82b02a886b8e3a04fd4ec249e1d403e4 /libs/hwui/PathCache.cpp
parentfaecafce62ca39a7693669f7c9eabf2d71c633cf (diff)
Tessellate on worker threads
Tessellate and cache (where possible) shadow and round rect tessellation tasks. Change-Id: I2cfda8e11d83d51ea74af871235cf26e8f831d40
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 5a49f38c6996..ab6b742f8f4f 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -74,10 +74,6 @@ hash_t PathDescription::hash() const {
return JenkinsHashWhiten(hash);
}
-int PathDescription::compare(const PathDescription& rhs) const {
- return memcmp(this, &rhs, sizeof(PathDescription));
-}
-
///////////////////////////////////////////////////////////////////////////////
// Utilities
///////////////////////////////////////////////////////////////////////////////
@@ -163,14 +159,7 @@ PathCache::PathCache():
} else {
INIT_LOGD(" Using default %s cache size of %.2fMB", name, DEFAULT_PATH_CACHE_SIZE);
}
- init();
-}
-PathCache::~PathCache() {
- mCache.clear();
-}
-
-void PathCache::init() {
mCache.setOnEntryRemovedListener(this);
GLint maxTextureSize;
@@ -180,6 +169,10 @@ void PathCache::init() {
mDebugEnabled = readDebugLevel() & kDebugCaches;
}
+PathCache::~PathCache() {
+ mCache.clear();
+}
+
///////////////////////////////////////////////////////////////////////////////
// Size management
///////////////////////////////////////////////////////////////////////////////
@@ -341,7 +334,7 @@ PathCache::PathProcessor::PathProcessor(Caches& caches):
}
void PathCache::PathProcessor::onProcess(const sp<Task<SkBitmap*> >& task) {
- sp<PathTask> t = static_cast<PathTask* >(task.get());
+ PathTask* t = static_cast<PathTask*>(task.get());
ATRACE_NAME("pathPrecache");
float left, top, offset;