Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index fe6694d154880370d79659b67bf0f17590a25dcf..b700ce147b1ea57c86cfc58352d063a6f06d5cef 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1932,6 +1932,22 @@ void SkCanvas::drawAtlas(const SkImage* atlas, const SkRSXform xform[], const Sk |
this->onDrawAtlas(atlas, xform, tex, colors, count, mode, cull, paint); |
} |
+void SkCanvas::drawLitAtlas(const SkImage* atlas, const SkRSXform xforms[], |
+ const SkRect diffTex[], const SkRect normTex[], |
+ const SkColor colors[], int count, SkXfermode::Mode mode, |
+ const SkRect* cull, const SkPaint* paint, |
+ const SkLight lights[], int numLights) { |
+ if (count <= 0) { |
+ return; |
+ } |
+ SkASSERT(atlas); |
+ SkASSERT(xforms); |
+ SkASSERT(diffTex); |
+ SkASSERT(normTex); |
+ this->onDrawLitAtlas(atlas, xforms, diffTex, normTex, colors, count, mode, cull, |
+ paint, lights, numLights); |
+} |
+ |
void SkCanvas::legacy_drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst, |
const SkPaint* paint, SrcRectConstraint constraint) { |
if (src) { |
@@ -2621,6 +2637,28 @@ void SkCanvas::onDrawAtlas(const SkImage* atlas, const SkRSXform xform[], const |
LOOPER_END |
} |
+void SkCanvas::onDrawLitAtlas(const SkImage* atlas, const SkRSXform xform[], |
+ const SkRect diffTex[], const SkRect normTex[], |
+ const SkColor colors[], int count, SkXfermode::Mode mode, |
+ const SkRect* cull, const SkPaint* paint, |
+ const SkLight lights[], int numLights) { |
+ if (cull && this->quickReject(*cull)) { |
+ return; |
+ } |
+ |
+ SkPaint pnt; |
+ if (paint) { |
+ pnt = *paint; |
+ } |
+ |
+ LOOPER_BEGIN(pnt, SkDrawFilter::kPath_Type, NULL) |
+ while (iter.next()) { |
+ iter.fDevice->drawLitAtlas(iter, atlas, xform, diffTex, normTex, colors, count, mode, pnt, |
+ lights, numLights); |
+ } |
+ LOOPER_END |
+} |
+ |
////////////////////////////////////////////////////////////////////////////// |
// These methods are NOT virtual, and therefore must call back into virtual |
// methods, rather than actually drawing themselves. |