Index: src/image/SkImage.cpp |
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp |
index 4315ad7e87fcd56245c8458415f0d11223723d0d..654b848fce22073ba274c57cbe0768c3464093dc 100644 |
--- a/src/image/SkImage.cpp |
+++ b/src/image/SkImage.cpp |
@@ -55,7 +55,14 @@ bool SkImage::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dst |
} |
void SkImage::preroll(GrContext* ctx) const { |
- as_IB(this)->onPreroll(ctx); |
+ // For now, and to maintain parity w/ previous pixelref behavior, we just force the image |
+ // to produce a cached raster-bitmap form, so that drawing to a raster canvas should be fast. |
+ // |
+ SkBitmap bm; |
+ if (as_IB(this)->getROPixels(&bm)) { |
+ bm.lockPixels(); |
+ bm.unlockPixels(); |
+ } |
} |
SkShader* SkImage::newShader(SkShader::TileMode tileX, |