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

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

Issue 1714363002: SkNx: kth<...>() -> [...] (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: the rest Created 4 years, 10 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/SkPM4fPriv.h ('k') | src/core/SkXfermode.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 "SkScan.h" 8 #include "SkScan.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkRasterClip.h" 10 #include "SkRasterClip.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 static SkRect compute_nocheck_cubic_bounds(const SkPoint pts[4]) { 319 static SkRect compute_nocheck_cubic_bounds(const SkPoint pts[4]) {
320 SkASSERT(SkScalarsAreFinite(&pts[0].fX, 8)); 320 SkASSERT(SkScalarsAreFinite(&pts[0].fX, 8));
321 321
322 Sk2s min = Sk2s::Load(pts); 322 Sk2s min = Sk2s::Load(pts);
323 Sk2s max = min; 323 Sk2s max = min;
324 for (int i = 1; i < 4; ++i) { 324 for (int i = 1; i < 4; ++i) {
325 Sk2s pair = Sk2s::Load(pts+i); 325 Sk2s pair = Sk2s::Load(pts+i);
326 min = Sk2s::Min(min, pair); 326 min = Sk2s::Min(min, pair);
327 max = Sk2s::Max(max, pair); 327 max = Sk2s::Max(max, pair);
328 } 328 }
329 return { min.kth<0>(), min.kth<1>(), max.kth<0>(), max.kth<1>() }; 329 return { min[0], min[1], max[0], max[1] };
330 } 330 }
331 331
332 static bool is_inverted(const SkRect& r) { 332 static bool is_inverted(const SkRect& r) {
333 return r.fLeft > r.fRight || r.fTop > r.fBottom; 333 return r.fLeft > r.fRight || r.fTop > r.fBottom;
334 } 334 }
335 335
336 // Can't call SkRect::intersects, since it cares about empty, and we don't (sinc e we tracking 336 // Can't call SkRect::intersects, since it cares about empty, and we don't (sinc e we tracking
337 // something to be stroked, so empty can still draw something (e.g. horizontal l ine) 337 // something to be stroked, so empty can still draw something (e.g. horizontal l ine)
338 static bool geometric_overlap(const SkRect& a, const SkRect& b) { 338 static bool geometric_overlap(const SkRect& a, const SkRect& b) {
339 SkASSERT(!is_inverted(a) && !is_inverted(b)); 339 SkASSERT(!is_inverted(a) && !is_inverted(b));
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 679
680 SkAAClipBlitterWrapper wrap; 680 SkAAClipBlitterWrapper wrap;
681 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { 681 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) {
682 wrap.init(clip, blitter); 682 wrap.init(clip, blitter);
683 blitter = wrap.getBlitter(); 683 blitter = wrap.getBlitter();
684 clipRgn = &wrap.getRgn(); 684 clipRgn = &wrap.getRgn();
685 } 685 }
686 AntiHairLineRgn(pts, count, clipRgn, blitter); 686 AntiHairLineRgn(pts, count, clipRgn, blitter);
687 } 687 }
688 } 688 }
OLDNEW
« no previous file with comments | « src/core/SkPM4fPriv.h ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698