| Index: src/core/SkCanvas.cpp
|
| diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
|
| index ce99546728a09171bf57aa51cb30daadeb42ede2..c523ca07dd2c644088706507ac10d824feb60473 100644
|
| --- a/src/core/SkCanvas.cpp
|
| +++ b/src/core/SkCanvas.cpp
|
| @@ -1776,7 +1776,12 @@ void SkCanvas::onDrawRect(const SkRect& r, const SkPaint& paint) {
|
| SkRect storage;
|
| const SkRect* bounds = NULL;
|
| if (paint.canComputeFastBounds()) {
|
| - bounds = &paint.computeFastBounds(r, &storage);
|
| + // Skia will draw an inverted rect, because it explicitly "sorts" it downstream.
|
| + // To prevent accidental rejecting at this stage, we have to sort it before we check.
|
| + SkRect tmp(r);
|
| + tmp.sort();
|
| +
|
| + bounds = &paint.computeFastBounds(tmp, &storage);
|
| if (this->quickReject(*bounds)) {
|
| return;
|
| }
|
|
|