summaryrefslogtreecommitdiff
path: root/libs/hwui/TessellationCache.h
diff options
context:
space:
mode:
author sergeyv <sergeyv@google.com> 2016-04-07 18:06:53 -0700
committer sergeyv <sergeyv@google.com> 2016-04-11 13:09:00 -0700
commit7224e2b624daea67b5653285c9640f170c096bdb (patch)
tree9bca3d8af9944c0408daa8363da13bb77067b91b /libs/hwui/TessellationCache.h
parent70dc7e2f06ff71d83412ee794488ff6d603755ab (diff)
Stop comparing Descriptions with memcmp
bug:27894959 Change-Id: I379c11381c08f6f77577a914638b32415768f26e
Diffstat (limited to 'libs/hwui/TessellationCache.h')
-rw-r--r--libs/hwui/TessellationCache.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/libs/hwui/TessellationCache.h b/libs/hwui/TessellationCache.h
index 0bd6365db60f..6141b4ef63d7 100644
--- a/libs/hwui/TessellationCache.h
+++ b/libs/hwui/TessellationCache.h
@@ -52,10 +52,10 @@ public:
typedef Pair<VertexBuffer*, VertexBuffer*> vertexBuffer_pair_t;
struct Description {
- DESCRIPTION_TYPE(Description);
- enum Type {
- kNone,
- kRoundRect,
+ HASHABLE_TYPE(Description);
+ enum class Type {
+ None,
+ RoundRect,
};
Type type;
@@ -76,18 +76,16 @@ public:
Description();
Description(Type type, const Matrix4& transform, const SkPaint& paint);
- hash_t hash() const;
void setupMatrixAndPaint(Matrix4* matrix, SkPaint* paint) const;
};
struct ShadowDescription {
- DESCRIPTION_TYPE(ShadowDescription);
- const void* nodeKey;
+ HASHABLE_TYPE(ShadowDescription);
+ const SkPath* nodeKey;
float matrixData[16];
ShadowDescription();
- ShadowDescription(const void* nodeKey, const Matrix4* drawTransform);
- hash_t hash() const;
+ ShadowDescription(const SkPath* nodeKey, const Matrix4* drawTransform);
};
class ShadowTask : public Task<vertexBuffer_pair_t> {