Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: src/core/SkMallocPixelRef.cpp

Issue 27392002: Remove SkColorTable from SkFlattenable hierarchy. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: reupload Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkColorTable.cpp ('k') | src/ports/SkGlobalInitialization_default.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMallocPixelRef.cpp
diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp
index d70098396161065e75c79b6dc9a58055d080ffe6..341ac9eb88ed951897a570802bdb889859c284e6 100644
--- a/src/core/SkMallocPixelRef.cpp
+++ b/src/core/SkMallocPixelRef.cpp
@@ -46,7 +46,7 @@ void SkMallocPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const {
buffer.writeByteArray(fStorage, fSize);
buffer.writeBool(fCTable != NULL);
if (fCTable) {
- buffer.writeFlattenable(fCTable);
+ fCTable->writeToBuffer(buffer);
}
}
@@ -56,7 +56,7 @@ SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer)
fStorage = sk_malloc_throw(fSize);
buffer.readByteArray(fStorage);
if (buffer.readBool()) {
- fCTable = buffer.readFlattenableT<SkColorTable>();
+ fCTable = SkNEW_ARGS(SkColorTable, (buffer));
} else {
fCTable = NULL;
}
« no previous file with comments | « src/core/SkColorTable.cpp ('k') | src/ports/SkGlobalInitialization_default.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698