aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkDataPixelRef.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-14 14:33:11 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-14 14:33:11 +0000
commitda30055b296faa5a100e474e0406ef4296c14241 (patch)
tree0bcc7d20f3efea9e802b4df6ed1ab13277b2bf33 /src/image/SkDataPixelRef.cpp
parent9eef56bd3e260a1e6a17640be4a620bf325261e1 (diff)
SkData need not be a Flattenable, since it does not need subclass/factories
BUG= R=mtklein@google.com Review URL: https://codereview.chromium.org/26928002 git-svn-id: http://skia.googlecode.com/svn/trunk@11754 2bbb7eff-a529-9590-31e7-b0007b416f81
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);
}