Chromium Code Reviews| 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) { |
|
robertphillips
2015/06/24 15:11:02
Why not quickReject in the non-virtual method ?
reed1
2015/06/24 16:17:48
We don't seem to do that for any calls (afaik). Th
robertphillips
2015/06/24 16:26:26
Don't we do it for drawDrawable & drawPath (just l
|
| + 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. |