Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 63a9241f60ec950f3d8bbed87e9aaa3b045b31de..7949cb3be14cf2c901262a3df8fffdce52e05633 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1669,20 +1669,32 @@ void SkCanvas::drawImageRect(const SkImage* image, const SkRect* src, const SkRe |
} |
void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar dx, SkScalar dy, const SkPaint* paint) { |
+ if (bitmap.empty()) { |
+ return; |
+ } |
this->onDrawBitmap(bitmap, dx, dy, paint); |
} |
void SkCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, |
const SkPaint* paint, DrawBitmapRectFlags flags) { |
+ if (bitmap.empty()) { |
+ return; |
+ } |
this->onDrawBitmapRect(bitmap, src, dst, paint, flags); |
} |
void SkCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst, |
const SkPaint* paint) { |
+ if (bitmap.empty()) { |
+ return; |
+ } |
this->onDrawBitmapNine(bitmap, center, dst, paint); |
} |
void SkCanvas::drawSprite(const SkBitmap& bitmap, int left, int top, const SkPaint* paint) { |
+ if (bitmap.empty()) { |
+ return; |
+ } |
this->onDrawSprite(bitmap, left, top, paint); |
} |