Index: src/core/SkSpecialImage.cpp |
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp |
index dfbde75dc7eea30813401f1e45ecde11893d48a8..f49f22859ac4fe4138eaf8a40fbf35841b80fd76 100644 |
--- a/src/core/SkSpecialImage.cpp |
+++ b/src/core/SkSpecialImage.cpp |
@@ -325,10 +325,15 @@ public: |
bool onPeekPixels(SkPixmap* pixmap) const override { |
const SkImageInfo info = fBitmap.info(); |
- if ((kUnknown_SkColorType == info.colorType()) || !fBitmap.getPixels()) { |
+ |
+ if (kUnknown_SkColorType == info.colorType()) { |
return false; |
} |
+ if (!fBitmap.peekPixels(pixmap)) { |
+ fBitmap.lockPixels(); |
+ } |
+ |
return fBitmap.peekPixels(pixmap); |
} |