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

Unified Diff: src/core/SkPixelRef.cpp

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whoops, read buffers have .size() Created 6 years, 11 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/SkPicturePlayback.cpp ('k') | src/core/SkReadBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixelRef.cpp
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index d08796b18c818aaca263b128de5091f63d3a67bd..30b405f7e9c303bac132e340bbd014867e09132c 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -6,7 +6,8 @@
* found in the LICENSE file.
*/
#include "SkPixelRef.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
#include "SkThread.h"
#ifdef SK_USE_POSIX_THREADS
@@ -101,13 +102,13 @@ SkPixelRef::SkPixelRef(const SkImageInfo& info, SkBaseMutex* mutex) : fInfo(info
fPreLocked = false;
}
-static SkImageInfo read_info(SkFlattenableReadBuffer& buffer) {
+static SkImageInfo read_info(SkReadBuffer& buffer) {
SkImageInfo info;
info.unflatten(buffer);
return info;
}
-SkPixelRef::SkPixelRef(SkFlattenableReadBuffer& buffer, SkBaseMutex* mutex)
+SkPixelRef::SkPixelRef(SkReadBuffer& buffer, SkBaseMutex* mutex)
: INHERITED(buffer)
, fInfo(read_info(buffer))
{
@@ -148,7 +149,7 @@ void SkPixelRef::setPreLocked(void* pixels, size_t rowBytes, SkColorTable* ctabl
#endif
}
-void SkPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const {
+void SkPixelRef::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
fInfo.flatten(buffer);
buffer.writeBool(fIsImmutable);
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkReadBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698