Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index fcfb6414075da44c6e5f148d5987b3deaa936241..d7c62e8e1133ad23e5efd7931dda6e6408dc14ed 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1801,6 +1801,18 @@ void SkCanvas::drawSprite(const SkBitmap& bitmap, int left, int top, const SkPai |
this->onDrawSprite(bitmap, left, top, paint); |
} |
+void SkCanvas::drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[], |
+ const SkColor colors[], int count, SkXfermode::Mode mode, |
+ const SkRect* cull, const SkPaint* paint) { |
+ if (count <= 0) { |
+ return; |
+ } |
+ SkASSERT(atlas); |
+ SkASSERT(xform); |
+ SkASSERT(tex); |
+ this->onDrawAtlas(atlas, xform, tex, colors, count, mode, cull, paint); |
+} |
+ |
////////////////////////////////////////////////////////////////////////////// |
// These are the virtual drawing methods |
////////////////////////////////////////////////////////////////////////////// |
@@ -2449,6 +2461,25 @@ void SkCanvas::onDrawDrawable(SkDrawable* dr) { |
dr->draw(this); |
} |
+void SkCanvas::onDrawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[], |
+ const SkColor colors[], int count, SkXfermode::Mode mode, |
+ const SkRect* cull, const SkPaint* paint) { |
+ if (cull && this->quickReject(*cull)) { |
+ return; |
+ } |
+ |
+ SkPaint pnt; |
+ if (paint) { |
+ pnt = *paint; |
+ } |
+ |
+ LOOPER_BEGIN(pnt, SkDrawFilter::kPath_Type, NULL) |
+ while (iter.next()) { |
+ iter.fDevice->drawAtlas(iter, atlas, xform, tex, colors, count, mode, pnt); |
+ } |
+ LOOPER_END |
+} |
+ |
////////////////////////////////////////////////////////////////////////////// |
// These methods are NOT virtual, and therefore must call back into virtual |
// methods, rather than actually drawing themselves. |