Index: src/lazy/SkCachingPixelRef.cpp |
diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp |
index f5026c7365975c3b8e588ea3af16a49812a3bfe7..f1510fb67c3e23095336649a6dac2faeb18cf967 100644 |
--- a/src/lazy/SkCachingPixelRef.cpp |
+++ b/src/lazy/SkCachingPixelRef.cpp |
@@ -12,13 +12,15 @@ |
SkBitmap* dst) { |
SkImageInfo info; |
SkASSERT(dst != NULL); |
- if (!generator || !generator->getInfo(&info)) { |
+ if ((NULL == generator) |
+ || !(generator->getInfo(&info)) |
+ || !dst->setConfig(info, 0)) { |
SkDELETE(generator); |
return false; |
} |
SkAutoTUnref<SkCachingPixelRef> ref(SkNEW_ARGS(SkCachingPixelRef, |
(info, generator, dst->rowBytes()))); |
- dst->installPixelRef(ref); |
+ dst->setPixelRef(ref); |
return true; |
} |