aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/Sk2DPathEffect.cpp
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-30 16:54:13 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-30 16:54:13 +0000
commitd2700eec7eb2e26beb206b88a0f0b6f3c5f49118 (patch)
treec43ed22ce3a91677ca29d04b733bbcc7847304ac /src/effects/Sk2DPathEffect.cpp
parentdde718c558b118e2a918d14046770a8c37d75040 (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.cpp11
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);
}