Index: src/core/SkBitmapDevice.cpp |
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp |
index 932a6ef2369015ce5a94825e9a43544d25536d56..aa5bd989c23545ca067523ffc9c92a60cb6d48de 100644 |
--- a/src/core/SkBitmapDevice.cpp |
+++ b/src/core/SkBitmapDevice.cpp |
@@ -329,6 +329,15 @@ void SkBitmapDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, |
draw.drawSprite(bitmap, x, y, paint); |
} |
+void SkBitmapDevice::drawSprite(const SkDraw& draw, const SkImage& image, |
+ int x, int y, const SkPaint& paint) { |
+ SkBitmap bitmap; |
+ if (!as_IB(&image)->getROPixels(&bitmap)) { |
+ return; |
+ } |
+ draw.drawSprite(bitmap, x, y, paint); |
+} |
+ |
void SkBitmapDevice::drawText(const SkDraw& draw, const void* text, size_t len, |
SkScalar x, SkScalar y, const SkPaint& paint) { |
draw.drawText((const char*)text, len, x, y, paint); |