From bd5fa90dd12faf3aa5fe336907b71f9ad3bee7a6 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Tue, 31 Jul 2012 15:19:56 +0000 Subject: [PATCH] add flattening git-svn-id: http://skia.googlecode.com/svn/trunk@4857 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/image/SkDataPixelRef.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/image/SkDataPixelRef.cpp b/src/image/SkDataPixelRef.cpp index e02f0ec..0a69318 100644 --- a/src/image/SkDataPixelRef.cpp +++ b/src/image/SkDataPixelRef.cpp @@ -28,15 +28,13 @@ void SkDataPixelRef::onUnlockPixels() { void SkDataPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); - -// fData->flatten(buffer); + buffer.writeFlattenable(fData); } SkDataPixelRef::SkDataPixelRef(SkFlattenableReadBuffer& buffer) : INHERITED(buffer, NULL) { - -// fData = buffer.readData(); - this->setPreLocked(const_cast(fData->data()), NULL); + fData = (SkData*)buffer.readFlattenable(); + this->setPreLocked(const_cast(fData->data()), NULL); } SK_DEFINE_FLATTENABLE_REGISTRAR(SkDataPixelRef) -- 2.7.4