| Index: src/gpu/SkGr.cpp
|
| diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
|
| index d76a34a1cf76660946a89f9f9c927b229447e00b..1a330344a7c5ebe839154633dca443bf130a7ac9 100644
|
| --- a/src/gpu/SkGr.cpp
|
| +++ b/src/gpu/SkGr.cpp
|
| @@ -24,7 +24,7 @@
|
| static void build_compressed_data(void* buffer, const SkBitmap& bitmap) {
|
| SkASSERT(SkBitmap::kIndex8_Config == bitmap.config());
|
|
|
| - SkAutoLockPixels apl(bitmap);
|
| + SkAutoLockPixels alp(bitmap);
|
| if (!bitmap.readyToDraw()) {
|
| SkDEBUGFAIL("bitmap not ready to draw!");
|
| return;
|
| @@ -135,6 +135,10 @@ static GrTexture* sk_gr_create_bitmap_texture(GrContext* ctx,
|
| }
|
| }
|
|
|
| + SkAutoLockPixels alp(*bitmap);
|
| + if (!bitmap->readyToDraw()) {
|
| + return NULL;
|
| + }
|
| if (cache) {
|
| // This texture is likely to be used again so leave it in the cache
|
| GrCacheID cacheID;
|
|
|