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

Unified Diff: src/core/SkOrderedWriteBuffer.cpp

Issue 15713015: Read and write pixel offset when serializing bitmaps. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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/SkOrderedReadBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkOrderedWriteBuffer.cpp
diff --git a/src/core/SkOrderedWriteBuffer.cpp b/src/core/SkOrderedWriteBuffer.cpp
index c03da513de018a6d6a9b38748e27bf88982222b1..64f52193acaf7c55dab611a5b53f41f13685fd7e 100644
--- a/src/core/SkOrderedWriteBuffer.cpp
+++ b/src/core/SkOrderedWriteBuffer.cpp
@@ -181,16 +181,13 @@ void SkOrderedWriteBuffer::writeBitmap(const SkBitmap& bitmap) {
}
if (fBitmapEncoder != NULL) {
SkASSERT(NULL == fBitmapHeap);
- size_t offset;
+ size_t offset = 0;
SkAutoDataUnref data(fBitmapEncoder(&offset, bitmap));
if (data.get() != NULL) {
// Write the length to indicate that the bitmap was encoded successfully, followed
// by the actual data.
this->writeUInt(SkToU32(data->size()));
fWriter.writePad(data->data(), data->size());
-#ifdef BUMP_PICTURE_VERSION
- // Recording this fixes https://code.google.com/p/skia/issues/detail?id=1301, but
- // also requires bumping PICTURE_VERSION, so leaving out for now.
// Store the coordinate of the offset, rather than fPixelRefOffset, which may be
// different depending on the decoder.
int32_t x, y;
@@ -200,7 +197,6 @@ void SkOrderedWriteBuffer::writeBitmap(const SkBitmap& bitmap) {
}
this->write32(x);
this->write32(y);
-#endif
return;
}
}
« no previous file with comments | « src/core/SkOrderedReadBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698