| Index: src/core/SkCanvas.cpp
|
| diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
|
| index c0c6f8af3e1322d13a600c189f6f9a1f59a1fda7..a47bd89c0507acad23ca7512279813ddd4a8697f 100644
|
| --- a/src/core/SkCanvas.cpp
|
| +++ b/src/core/SkCanvas.cpp
|
| @@ -1848,64 +1848,15 @@
|
| LOOPER_END
|
| }
|
|
|
| -void SkCanvas::onDrawImage(const SkImage* image, SkScalar dx, SkScalar dy,
|
| - const SkPaint* paint) {
|
| +void SkCanvas::onDrawImage(const SkImage* image, SkScalar dx, SkScalar dy, const SkPaint* paint) {
|
| TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawImage()");
|
| -
|
| - SkRect bounds = SkRect::MakeXYWH(dx, dy, image->width(), image->height());
|
| - if (NULL == paint || paint->canComputeFastBounds()) {
|
| - if (NULL != paint) {
|
| - paint->computeFastBounds(bounds, &bounds);
|
| - }
|
| - if (this->quickReject(bounds)) {
|
| - return;
|
| - }
|
| - }
|
| -
|
| - SkLazyPaint lazy;
|
| - if (NULL == paint) {
|
| - paint = lazy.init();
|
| - }
|
| -
|
| - LOOPER_BEGIN(*paint, SkDrawFilter::kImage_Type, &bounds)
|
| -
|
| - while (iter.next()) {
|
| - SkPaint p = looper.paint();
|
| - p.setLooper(NULL);
|
| - image->draw(this, dx, dy, &p);
|
| - }
|
| -
|
| - LOOPER_END
|
| + image->draw(this, dx, dy, paint);
|
| }
|
|
|
| void SkCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
|
| const SkPaint* paint) {
|
| TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawImageRect()");
|
| - SkRect storage;
|
| - const SkRect* bounds = &dst;
|
| - if (NULL == paint || paint->canComputeFastBounds()) {
|
| - if (NULL != paint) {
|
| - bounds = &paint->computeFastBounds(dst, &storage);
|
| - }
|
| - if (this->quickReject(*bounds)) {
|
| - return;
|
| - }
|
| - }
|
| -
|
| - SkLazyPaint lazy;
|
| - if (NULL == paint) {
|
| - paint = lazy.init();
|
| - }
|
| -
|
| - LOOPER_BEGIN(*paint, SkDrawFilter::kImage_Type, bounds)
|
| -
|
| - while (iter.next()) {
|
| - SkPaint p = looper.paint();
|
| - p.setLooper(NULL);
|
| - image->drawRect(this, src, dst, &p);
|
| - }
|
| -
|
| - LOOPER_END
|
| + image->drawRect(this, src, dst, paint);
|
| }
|
|
|
| void SkCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, const SkPaint* paint) {
|
|
|