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

Unified Diff: src/core/SkWriteBuffer.cpp

Issue 1936563002: remove SkWriteBuffer::getWriter32(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « include/core/SkWriteBuffer.h ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkWriteBuffer.cpp
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp
index b90a81e631593aab3cc53ddbc71e29a882a567f3..2b35b67702d490aa7e4b7c4df3f53669321d0c96 100644
--- a/src/core/SkWriteBuffer.cpp
+++ b/src/core/SkWriteBuffer.cpp
@@ -136,8 +136,7 @@ bool SkWriteBuffer::writeToStream(SkWStream* stream) {
static void write_encoded_bitmap(SkWriteBuffer* buffer, SkData* data,
const SkIPoint& origin) {
- buffer->writeUInt(SkToU32(data->size()));
- buffer->getWriter32()->writePad(data->data(), data->size());
+ buffer->writeDataAsByteArray(data);
buffer->write32(origin.fX);
buffer->write32(origin.fY);
}
« no previous file with comments | « include/core/SkWriteBuffer.h ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698