| Index: src/utils/SkTextureCompressor.cpp
|
| diff --git a/src/utils/SkTextureCompressor.cpp b/src/utils/SkTextureCompressor.cpp
|
| index 12621e118f9275f394500008d6a29e2ace4ac369..9d29d51d6084e02765ad0e13cdbc13f19cf2c6ee 100644
|
| --- a/src/utils/SkTextureCompressor.cpp
|
| +++ b/src/utils/SkTextureCompressor.cpp
|
| @@ -173,19 +173,17 @@ bool CompressBufferToFormat(uint8_t* dst, const uint8_t* src, SkColorType srcCol
|
| return false;
|
| }
|
|
|
| -SkData* CompressBitmapToFormat(const SkBitmap &bitmap, Format format) {
|
| - SkAutoLockPixels alp(bitmap);
|
| -
|
| - int compressedDataSize = GetCompressedDataSize(format, bitmap.width(), bitmap.height());
|
| +SkData* CompressBitmapToFormat(const SkPixmap& pixmap, Format format) {
|
| + int compressedDataSize = GetCompressedDataSize(format, pixmap.width(), pixmap.height());
|
| if (compressedDataSize < 0) {
|
| return NULL;
|
| }
|
|
|
| - const uint8_t* src = reinterpret_cast<const uint8_t*>(bitmap.getPixels());
|
| + const uint8_t* src = reinterpret_cast<const uint8_t*>(pixmap.addr());
|
| SkData* dst = SkData::NewUninitialized(compressedDataSize);
|
|
|
| - if (!CompressBufferToFormat((uint8_t*)dst->writable_data(), src, bitmap.colorType(),
|
| - bitmap.width(), bitmap.height(), bitmap.rowBytes(), format)) {
|
| + if (!CompressBufferToFormat((uint8_t*)dst->writable_data(), src, pixmap.colorType(),
|
| + pixmap.width(), pixmap.height(), pixmap.rowBytes(), format)) {
|
| dst->unref();
|
| dst = NULL;
|
| }
|
|
|