Index: src/utils/SkDeferredCanvas.cpp |
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp |
index ccf0b012b12d29323df2e621800872b37cdaa669..8e3423584857b0217f8da6759bec4435af4949d3 100644 |
--- a/src/utils/SkDeferredCanvas.cpp |
+++ b/src/utils/SkDeferredCanvas.cpp |
@@ -229,6 +229,9 @@ protected: |
void drawImageRect(const SkDraw&, const SkImage*, const SkRect*, const SkRect&, |
const SkPaint&) override |
{SkASSERT(0);} |
+ void drawImageNine(const SkDraw&, const SkImage*, const SkIRect&, const SkRect&, |
+ const SkPaint&) override |
+ {SkASSERT(0);} |
void drawText(const SkDraw&, const void* text, size_t len, |
SkScalar x, SkScalar y, const SkPaint& paint) override |
{SkASSERT(0);} |
@@ -903,6 +906,19 @@ void SkDeferredCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, |
this->recordedDrawCommand(); |
} |
+void SkDeferredCanvas::onDrawImageNine(const SkImage* image, const SkIRect& center, |
+ const SkRect& dst, const SkPaint* paint) { |
+ if (fDeferredDrawing && |
+ this->isFullFrame(&dst, paint) && |
+ isPaintOpaque(paint, image)) { |
+ this->getDeferredDevice()->skipPendingCommands(); |
+ } |
+ |
+ AutoImmediateDrawIfNeeded autoDraw(*this, image, paint); |
+ this->drawingCanvas()->drawImageNine(image, center, dst, paint); |
+ this->recordedDrawCommand(); |
+} |
+ |
void SkDeferredCanvas::onDrawBitmapNine(const SkBitmap& bitmap, |
const SkIRect& center, const SkRect& dst, |
const SkPaint* paint) { |