if (encoder->encode(stream, pY, width, height, offsets, quality)) {
ALOGV("%s: Compressed JPEG: %d[%dx%d] -> %zu bytes",
__FUNCTION__, (width * height * 12) / 8,
- width, height, stream->getOffset());
+ width, height, stream->bytesWritten());
return 0;
} else {
ALOGE("%s: JPEG compression failed", __FUNCTION__);
extern "C" size_t JpegStub_getCompressedSize(JpegStub* stub) {
SkDynamicMemoryWStream* stream =
(SkDynamicMemoryWStream*)stub->mInternalStream;
- return stream->getOffset();
+ return stream->bytesWritten();
}