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

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

Issue 1084433002: change hairline procs to take SkPoint by value, more efficient on SSE and NEON (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | « src/core/SkScan.h ('k') | src/core/SkScan_Hairline.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 /* 2 /*
3 * Copyright 2011 The Android Open Source Project 3 * Copyright 2011 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkScan.h" 10 #include "SkScan.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 istart += 1; 581 istart += 1;
582 int fullSpans = istop - istart - (scaleStop > 0); 582 int fullSpans = istop - istart - (scaleStop > 0);
583 if (fullSpans > 0) { 583 if (fullSpans > 0) {
584 fstart = hairBlitter->drawLine(istart, istart + fullSpans, fstart, slope ); 584 fstart = hairBlitter->drawLine(istart, istart + fullSpans, fstart, slope );
585 } 585 }
586 if (scaleStop > 0) { 586 if (scaleStop > 0) {
587 hairBlitter->drawCap(istop - 1, fstart, slope, scaleStop); 587 hairBlitter->drawCap(istop - 1, fstart, slope, scaleStop);
588 } 588 }
589 } 589 }
590 590
591 void SkScan::AntiHairLineRgn(const SkPoint& pt0, const SkPoint& pt1, 591 void SkScan::AntiHairLineRgn(SkPoint pt0, SkPoint pt1, const SkRegion* clip, SkB litter* blitter) {
592 const SkRegion* clip, SkBlitter* blitter) {
593 if (clip && clip->isEmpty()) { 592 if (clip && clip->isEmpty()) {
594 return; 593 return;
595 } 594 }
596 595
597 SkASSERT(clip == NULL || !clip->getBounds().isEmpty()); 596 SkASSERT(clip == NULL || !clip->getBounds().isEmpty());
598 597
599 #ifdef TEST_GAMMA 598 #ifdef TEST_GAMMA
600 build_gamma_table(); 599 build_gamma_table();
601 #endif 600 #endif
602 601
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 1064
1066 void SkScan::AntiFrameRect(const SkRect& r, const SkPoint& strokeSize, 1065 void SkScan::AntiFrameRect(const SkRect& r, const SkPoint& strokeSize,
1067 const SkRasterClip& clip, SkBlitter* blitter) { 1066 const SkRasterClip& clip, SkBlitter* blitter) {
1068 if (clip.isBW()) { 1067 if (clip.isBW()) {
1069 AntiFrameRect(r, strokeSize, &clip.bwRgn(), blitter); 1068 AntiFrameRect(r, strokeSize, &clip.bwRgn(), blitter);
1070 } else { 1069 } else {
1071 SkAAClipBlitterWrapper wrap(clip, blitter); 1070 SkAAClipBlitterWrapper wrap(clip, blitter);
1072 AntiFrameRect(r, strokeSize, &wrap.getRgn(), wrap.getBlitter()); 1071 AntiFrameRect(r, strokeSize, &wrap.getRgn(), wrap.getBlitter());
1073 } 1072 }
1074 } 1073 }
OLDNEW
« no previous file with comments | « src/core/SkScan.h ('k') | src/core/SkScan_Hairline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698