summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.h
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2014-06-27 18:30:23 -0700
committer Chris Craik <ccraik@google.com> 2014-06-30 18:02:23 +0000
commit906d47fd2bcedb9674b5765d01bd9c758069074c (patch)
treebec8f9c65c1bba8496f5dd9c41d78cc894a0fa48 /libs/hwui/PathCache.h
parent3e1585e05ddb0fd60033a5603e330b8ab1f69303 (diff)
Deep copy SkPath parameter to PathCache task
bug:15440706 Change-Id: I2b5b25f620df838cb1155cc8502d86ad3644c212
Diffstat (limited to 'libs/hwui/PathCache.h')
-rw-r--r--libs/hwui/PathCache.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/hwui/PathCache.h b/libs/hwui/PathCache.h
index eee138b8fddf..bc34188f061c 100644
--- a/libs/hwui/PathCache.h
+++ b/libs/hwui/PathCache.h
@@ -272,15 +272,18 @@ private:
class PathTask: public Task<SkBitmap*> {
public:
PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture):
- path(path), paint(*paint), texture(texture) {
+ path(*path), paint(*paint), texture(texture) {
}
~PathTask() {
delete future()->get();
}
- const SkPath* path;
- //copied, since input paint may not be immutable
+ // copied, since input path not refcounted / guaranteed to survive for duration of task
+ // TODO: avoid deep copy with refcounting
+ const SkPath path;
+
+ // copied, since input paint may not be immutable
const SkPaint paint;
PathTexture* texture;
};