aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkDataPixelRef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/image/SkDataPixelRef.cpp')
-rw-r--r--src/image/SkDataPixelRef.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image/SkDataPixelRef.cpp b/src/image/SkDataPixelRef.cpp
index 980b4f1451..0524243366 100644
--- a/src/image/SkDataPixelRef.cpp
+++ b/src/image/SkDataPixelRef.cpp
@@ -29,11 +29,11 @@ void SkDataPixelRef::onUnlockPixels() {
void SkDataPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
- buffer.writeFlattenable(fData);
+ buffer.writeDataAsByteArray(fData);
}
SkDataPixelRef::SkDataPixelRef(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer, NULL) {
- fData = (SkData*)buffer.readFlattenable();
+ fData = buffer.readByteArrayAsData();
this->setPreLocked(const_cast<void*>(fData->data()), NULL);
}