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

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

Issue 698003004: remove dead SK_DISABLE_DASHING_OPTIMIZATION flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | no next file » | 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 if (fDevice) { 621 if (fDevice) {
622 fDevice->drawRect(*this, r, newPaint); 622 fDevice->drawRect(*this, r, newPaint);
623 } else { 623 } else {
624 this->drawRect(r, newPaint); 624 this->drawRect(r, newPaint);
625 } 625 }
626 } 626 }
627 } 627 }
628 break; 628 break;
629 } 629 }
630 case SkCanvas::kLines_PointMode: 630 case SkCanvas::kLines_PointMode:
631 #ifndef SK_DISABLE_DASHING_OPTIMIZATION
632 if (2 == count && paint.getPathEffect()) { 631 if (2 == count && paint.getPathEffect()) {
633 // most likely a dashed line - see if it is one of the ones 632 // most likely a dashed line - see if it is one of the ones
634 // we can accelerate 633 // we can accelerate
635 SkStrokeRec rec(paint); 634 SkStrokeRec rec(paint);
636 SkPathEffect::PointData pointData; 635 SkPathEffect::PointData pointData;
637 636
638 SkPath path; 637 SkPath path;
639 path.moveTo(pts[0]); 638 path.moveTo(pts[0]);
640 path.lineTo(pts[1]); 639 path.lineTo(pts[1]);
641 640
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 fDevice->drawRect(*this, r, newP); 704 fDevice->drawRect(*this, r, newP);
706 } else { 705 } else {
707 this->drawRect(r, newP); 706 this->drawRect(r, newP);
708 } 707 }
709 } 708 }
710 } 709 }
711 710
712 break; 711 break;
713 } 712 }
714 } 713 }
715 #endif // DISABLE_DASHING_OPTIMIZATION
716 // couldn't take fast path so fall through! 714 // couldn't take fast path so fall through!
717 case SkCanvas::kPolygon_PointMode: { 715 case SkCanvas::kPolygon_PointMode: {
718 count -= 1; 716 count -= 1;
719 SkPath path; 717 SkPath path;
720 SkPaint p(paint); 718 SkPaint p(paint);
721 p.setStyle(SkPaint::kStroke_Style); 719 p.setStyle(SkPaint::kStroke_Style);
722 size_t inc = (SkCanvas::kLines_PointMode == mode) ? 2 : 1; 720 size_t inc = (SkCanvas::kLines_PointMode == mode) ? 2 : 1;
723 path.setIsVolatile(true); 721 path.setIsVolatile(true);
724 for (size_t i = 0; i < count; i += inc) { 722 for (size_t i = 0; i < count; i += inc) {
725 path.moveTo(pts[i]); 723 path.moveTo(pts[i]);
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 mask->fImage = SkMask::AllocImage(size); 2378 mask->fImage = SkMask::AllocImage(size);
2381 memset(mask->fImage, 0, mask->computeImageSize()); 2379 memset(mask->fImage, 0, mask->computeImageSize());
2382 } 2380 }
2383 2381
2384 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2382 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2385 draw_into_mask(*mask, devPath, style); 2383 draw_into_mask(*mask, devPath, style);
2386 } 2384 }
2387 2385
2388 return true; 2386 return true;
2389 } 2387 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698