From 739456585a0cc52b335cd1c0a9fc6b01782a7f89 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 25 Apr 2011 19:04:27 +0000 Subject: [PATCH] devolve flattening parameters to their base classes e.g. FlattenableReadBufer -> Reader32 git-svn-id: http://skia.googlecode.com/svn/trunk@1174 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkPath.h | 8 ++++---- src/core/SkPath.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/core/SkPath.h b/include/core/SkPath.h index d9a7093..2ebc59d 100644 --- a/include/core/SkPath.h +++ b/include/core/SkPath.h @@ -28,8 +28,8 @@ #define GEN_ID_PTR_INC(ptr) #endif -class SkFlattenableReadBuffer; -class SkFlattenableWriteBuffer; +class SkReader32; +class SkWriter32; class SkAutoPathBoundsUpdate; class SkString; @@ -579,8 +579,8 @@ public: void dump(bool forceClose, const char title[] = NULL) const; void dump() const; - void flatten(SkFlattenableWriteBuffer&) const; - void unflatten(SkFlattenableReadBuffer&); + void flatten(SkWriter32&) const; + void unflatten(SkReader32&); /** Subdivide the path so that no segment is longer that dist. If bendLines is true, then turn all line segments into curves. diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 5ddc31d..704863c 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -16,7 +16,8 @@ */ #include "SkPath.h" -#include "SkFlattenable.h" +#include "SkReader32.h" +#include "SkWriter32.h" #include "SkMath.h" //////////////////////////////////////////////////////////////////////////// @@ -1267,7 +1268,7 @@ DONE: Format in flattened buffer: [ptCount, verbCount, pts[], verbs[]] */ -void SkPath::flatten(SkFlattenableWriteBuffer& buffer) const { +void SkPath::flatten(SkWriter32& buffer) const { SkDEBUGCODE(this->validate();) buffer.write32(fPts.count()); @@ -1277,7 +1278,7 @@ void SkPath::flatten(SkFlattenableWriteBuffer& buffer) const { buffer.writePad(fVerbs.begin(), fVerbs.count()); } -void SkPath::unflatten(SkFlattenableReadBuffer& buffer) { +void SkPath::unflatten(SkReader32& buffer) { fPts.setCount(buffer.readS32()); fVerbs.setCount(buffer.readS32()); fFillType = buffer.readS32(); -- 2.7.4