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

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

Issue 2189583003: align cap hairline first point Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try a less intrusive change Created 4 years, 2 months 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 "SkScan.h" 8 #include "SkScan.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkMathPriv.h" 10 #include "SkMathPriv.h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 case SkPath::kCubic_Verb: { 576 case SkPath::kCubic_Verb: {
577 if (SkPaint::kButt_Cap != capStyle) { 577 if (SkPaint::kButt_Cap != capStyle) {
578 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 4); 578 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 4);
579 } 579 }
580 haircubic(pts, clip, insetClip, outsetClip, blitter, kMaxCubicSu bdivideLevel, lineproc); 580 haircubic(pts, clip, insetClip, outsetClip, blitter, kMaxCubicSu bdivideLevel, lineproc);
581 lastPt = pts[3]; 581 lastPt = pts[3];
582 } break; 582 } break;
583 case SkPath::kClose_Verb: 583 case SkPath::kClose_Verb:
584 pts[0] = lastPt; 584 pts[0] = lastPt;
585 pts[1] = firstPt; 585 pts[1] = firstPt;
586 if (SkPaint::kButt_Cap != capStyle && prevVerb == SkPath::kMove_ Verb) { 586 if (SkPaint::kButt_Cap != capStyle) {
587 // cap moveTo/close to match svg expectations for degenerate segments 587 // cap moveTo/close to match svg expectations for degenerate segments
588 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 2); 588 extend_pts<capStyle>(prevVerb, iter.peek(), pts, 2);
589 } 589 }
590 lineproc(pts, 2, clip, blitter); 590 lineproc(pts, 2, clip, blitter);
591 break; 591 break;
592 case SkPath::kDone_Verb: 592 case SkPath::kDone_Verb:
593 break; 593 break;
594 } 594 }
595 if (SkPaint::kButt_Cap != capStyle) { 595 if (SkPaint::kButt_Cap != capStyle) {
596 prevVerb = verb; 596 prevVerb = verb;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 SkAAClipBlitterWrapper wrap; 693 SkAAClipBlitterWrapper wrap;
694 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { 694 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) {
695 wrap.init(clip, blitter); 695 wrap.init(clip, blitter);
696 blitter = wrap.getBlitter(); 696 blitter = wrap.getBlitter();
697 clipRgn = &wrap.getRgn(); 697 clipRgn = &wrap.getRgn();
698 } 698 }
699 AntiHairLineRgn(pts, count, clipRgn, blitter); 699 AntiHairLineRgn(pts, count, clipRgn, blitter);
700 } 700 }
701 } 701 }
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