From 9f2251c73ed6f417dd1057d487bf523e04488440 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Tue, 4 Nov 2014 13:33:50 -0800 Subject: Crop the fast path dashed lines to the cull rect Without: maxrss loops min median mean max stddev samples config bench 56M 1 13.3ms 13.6ms 13.6ms 14.2ms 2% Ooooo..... 8888 GM_dashing5_bw 56M 13 390us 417us 416us 459us 5% ooooO..o.o gpu GM_dashing5_bw 56M 1 13.4ms 13.9ms 14.1ms 15ms 3% Oooo..ooOo 8888 GM_dashing5_aa 56M 13 402us 421us 416us 425us 2% Ooo.ooOOOO gpu GM_dashing5_aa With: 40M 1 1.53ms 1.54ms 1.54ms 1.55ms 0% oo.O...o.. 8888 GM_dashing5_bw 40M 12 407us 412us 415us 445us 3% ...Oo..... gpu GM_dashing5_bw 40M 1 1.7ms 1.7ms 1.7ms 1.72ms 0% o.O....... 8888 GM_dashing5_aa 43M 13 405us 409us 409us 415us 1% ooo.Ooo..o gpu GM_dashing5_aa The GM images (including the new one) are the same with and without this CL. BUG=428296 Review URL: https://codereview.chromium.org/699623003 --- src/core/SkDraw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/SkDraw.cpp') diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 82fd84b8bc..b9c39fa8ce 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -460,7 +460,7 @@ bool PtProcRec::init(SkCanvas::PointMode mode, const SkPaint& paint, return true; } if (paint.getStrokeCap() != SkPaint::kRound_Cap && - matrix->rectStaysRect() && SkCanvas::kPoints_PointMode == mode) { + matrix->isScaleTranslate() && SkCanvas::kPoints_PointMode == mode) { SkScalar sx = matrix->get(SkMatrix::kMScaleX); SkScalar sy = matrix->get(SkMatrix::kMScaleY); if (SkScalarNearlyZero(sx - sy)) { -- cgit v1.2.3