Chromium Code Reviews| Index: src/core/SkReadBuffer.cpp |
| diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp |
| index a3ae8ae9b90587e5db04d6afed83868d2ad7d070..9bd6ff423ae878059ef53e88530362e13e713168 100644 |
| --- a/src/core/SkReadBuffer.cpp |
| +++ b/src/core/SkReadBuffer.cpp |
| @@ -130,8 +130,8 @@ void* SkReadBuffer::readEncodedString(size_t* length, SkPaint::TextEncoding enco |
| } |
| void SkReadBuffer::readPoint(SkPoint* point) { |
| - point->fX = fReader.readScalar(); |
| - point->fY = fReader.readScalar(); |
| + point->fX = this->readScalar(); |
| + point->fY = this->readScalar(); |
| } |
| void SkReadBuffer::readMatrix(SkMatrix* matrix) { |
| @@ -199,8 +199,8 @@ bool SkReadBuffer::readBitmap(SkBitmap* bitmap) { |
| if (this->readBool()) { |
| // An SkBitmapHeap was used for writing. Read the index from the stream and find the |
| // corresponding SkBitmap in fBitmapStorage. |
| - const uint32_t index = fReader.readU32(); |
| - fReader.readU32(); // bitmap generation ID (see SkWriteBuffer::writeBitmap) |
| + const uint32_t index = this->readUInt(); |
| + this->readUInt(); // bitmap generation ID (see SkWriteBuffer::writeBitmap) |
| if (fBitmapStorage) { |
| *bitmap = *fBitmapStorage->getBitmap(index); |
| fBitmapStorage->releaseRef(index); |
| @@ -223,8 +223,8 @@ bool SkReadBuffer::readBitmap(SkBitmap* bitmap) { |
| // A non-zero size means the SkBitmap was encoded. Read the data and pixel |
| // offset. |
| const void* data = this->skip(length); |
| - const int32_t xOffset = fReader.readS32(); |
| - const int32_t yOffset = fReader.readS32(); |
| + const int32_t xOffset = this->readFixed(); |
|
reed1
2014/06/05 12:33:05
These are ints, not fixed.
sugoi
2014/06/05 12:43:16
readS32() is equivalent to readFixed(), so if I us
|
| + const int32_t yOffset = this->readFixed(); |
| if (fBitmapDecoder != NULL && fBitmapDecoder(data, length, bitmap)) { |
| if (bitmap->width() == width && bitmap->height() == height) { |
| #ifdef DEBUG_NON_DETERMINISTIC_ASSERT |