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
This commit is contained in:
reed@google.com 2011-04-25 19:04:27 +00:00
parent 4711a7ae95
commit 739456585a
2 changed files with 8 additions and 7 deletions

View File

@ -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.

View File

@ -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();