diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-30 16:54:13 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-30 16:54:13 +0000 |
commit | d2700eec7eb2e26beb206b88a0f0b6f3c5f49118 (patch) | |
tree | c43ed22ce3a91677ca29d04b733bbcc7847304ac /src/effects/Sk2DPathEffect.cpp | |
parent | dde718c558b118e2a918d14046770a8c37d75040 (diff) |
Refactor dictionaries for use by entities other than just SkPicture
Review URL: https://codereview.appspot.com/6101043
git-svn-id: http://skia.googlecode.com/svn/trunk@4077 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/Sk2DPathEffect.cpp')
-rw-r--r-- | src/effects/Sk2DPathEffect.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp index 3f8c998651..e19cdeb117 100644 --- a/src/effects/Sk2DPathEffect.cpp +++ b/src/effects/Sk2DPathEffect.cpp @@ -74,18 +74,11 @@ void Sk2DPathEffect::end(SkPath* dst) {} void Sk2DPathEffect::flatten(SkFlattenableWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); - char storage[SkMatrix::kMaxFlattenSize]; - uint32_t size = fMatrix.flatten(storage); - buffer.write32(size); - buffer.write(storage, size); + buffer.writeMatrix(fMatrix); } Sk2DPathEffect::Sk2DPathEffect(SkFlattenableReadBuffer& buffer) { - char storage[SkMatrix::kMaxFlattenSize]; - uint32_t size = buffer.readS32(); - SkASSERT(size <= sizeof(storage)); - buffer.read(storage, size); - fMatrix.unflatten(storage); + buffer.readMatrix(&fMatrix); fMatrixIsInvertible = fMatrix.invert(&fInverse); } |