Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: src/core/SkDraw.cpp

Issue 699623003: Crop the fast path dashed lines to the cull rect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address coordinate xform issue Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkMatrix.h ('k') | src/effects/SkDashPathEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkDraw.h" 8 #include "SkDraw.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 SkScalar width = paint.getStrokeWidth(); 453 SkScalar width = paint.getStrokeWidth();
454 if (0 == width) { 454 if (0 == width) {
455 fMode = mode; 455 fMode = mode;
456 fPaint = &paint; 456 fPaint = &paint;
457 fClip = NULL; 457 fClip = NULL;
458 fRC = rc; 458 fRC = rc;
459 fRadius = SK_FixedHalf; 459 fRadius = SK_FixedHalf;
460 return true; 460 return true;
461 } 461 }
462 if (paint.getStrokeCap() != SkPaint::kRound_Cap && 462 if (paint.getStrokeCap() != SkPaint::kRound_Cap &&
463 matrix->rectStaysRect() && SkCanvas::kPoints_PointMode == mode) { 463 matrix->isScaleTranslate() && SkCanvas::kPoints_PointMode == mode) {
464 SkScalar sx = matrix->get(SkMatrix::kMScaleX); 464 SkScalar sx = matrix->get(SkMatrix::kMScaleX);
465 SkScalar sy = matrix->get(SkMatrix::kMScaleY); 465 SkScalar sy = matrix->get(SkMatrix::kMScaleY);
466 if (SkScalarNearlyZero(sx - sy)) { 466 if (SkScalarNearlyZero(sx - sy)) {
467 if (sx < 0) { 467 if (sx < 0) {
468 sx = -sx; 468 sx = -sx;
469 } 469 }
470 470
471 fMode = mode; 471 fMode = mode;
472 fPaint = &paint; 472 fPaint = &paint;
473 fClip = NULL; 473 fClip = NULL;
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 mask->fImage = SkMask::AllocImage(size); 2378 mask->fImage = SkMask::AllocImage(size);
2379 memset(mask->fImage, 0, mask->computeImageSize()); 2379 memset(mask->fImage, 0, mask->computeImageSize());
2380 } 2380 }
2381 2381
2382 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2382 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2383 draw_into_mask(*mask, devPath, style); 2383 draw_into_mask(*mask, devPath, style);
2384 } 2384 }
2385 2385
2386 return true; 2386 return true;
2387 } 2387 }
OLDNEW
« no previous file with comments | « include/core/SkMatrix.h ('k') | src/effects/SkDashPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698