size_t size() { return fReader.size(); }
size_t offset() { return fReader.offset(); }
bool eof() { return fReader.eof(); }
- const void* skip(size_t size) { return fReader.skip(size); }
+ virtual const void* skip(size_t size) { return fReader.skip(size); }
void* readFunctionPtr() { return fReader.readPtr(); }
// primitives
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);
// 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->readInt();
+ const int32_t yOffset = this->readInt();
if (fBitmapDecoder != NULL && fBitmapDecoder(data, length, bitmap)) {
if (bitmap->width() == width && bitmap->height() == height) {
#ifdef DEBUG_NON_DETERMINISTIC_ASSERT
SkValidatingReadBuffer(const void* data, size_t size);
virtual ~SkValidatingReadBuffer();
- const void* skip(size_t size);
+ virtual const void* skip(size_t size) SK_OVERRIDE;
// primitives
virtual bool readBool() SK_OVERRIDE;