aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkGroupShape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkGroupShape.cpp')
-rw-r--r--src/effects/SkGroupShape.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/effects/SkGroupShape.cpp b/src/effects/SkGroupShape.cpp
index 0468d5b087..224d2a2eca 100644
--- a/src/effects/SkGroupShape.cpp
+++ b/src/effects/SkGroupShape.cpp
@@ -6,6 +6,7 @@
* found in the LICENSE file.
*/
#include "SkGroupShape.h"
+#include "SkFlattenableBuffers.h"
SkGroupShape::SkGroupShape() {}
@@ -86,8 +87,7 @@ void SkGroupShape::onDraw(SkCanvas* canvas) {
void SkGroupShape::flatten(SkFlattenableWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
- int count = fList.count();
- buffer.write32(count);
+ buffer.writeInt(fList.count());
const Rec* rec = fList.begin();
const Rec* stop = fList.end();
while (rec < stop) {
@@ -101,9 +101,9 @@ void SkGroupShape::flatten(SkFlattenableWriteBuffer& buffer) const {
}
SkGroupShape::SkGroupShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer){
- int count = buffer.readS32();
+ int count = buffer.readInt();
for (int i = 0; i < count; i++) {
- SkShape* shape = reinterpret_cast<SkShape*>(buffer.readFlattenable());
+ SkShape* shape = buffer.readFlattenableT<SkShape>();
SkMatrixRef* mr = NULL;
bool hasMatrix = buffer.readBool();
if (hasMatrix) {