add SkCanvas::drawAtlas

BUG=skia:

Review URL: https://codereview.chromium.org/1181913003
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index fcfb641..d7c62e8 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1801,6 +1801,18 @@
     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 @@
     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.