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

Side by Side Diff: src/pathops/SkPathOpsTSect.cpp

Issue 2426173002: fix fuzzers (Closed)
Patch Set: fix dm 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 | « src/pathops/SkPathOpsTSect.h ('k') | src/pathops/SkPathOpsTypes.h » ('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 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 "SkPathOpsTSect.h" 8 #include "SkPathOpsTSect.h"
9 9
10 int SkIntersections::intersect(const SkDQuad& quad1, const SkDQuad& quad2) { 10 int SkIntersections::intersect(const SkDQuad& quad1, const SkDQuad& quad2) {
11 SkTSect<SkDQuad, SkDQuad> sect1(quad1 11 SkTSect<SkDQuad, SkDQuad> sect1(quad1
12 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 12 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
13 SkTSect<SkDQuad, SkDQuad> sect2(quad2 13 SkTSect<SkDQuad, SkDQuad> sect2(quad2
14 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 14 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
15 SkTSect<SkDQuad, SkDQuad>::BinarySearch(&sect1, &sect2, this); 15 SkTSect<SkDQuad, SkDQuad>::BinarySearch(&sect1, &sect2, this);
16 return used(); 16 return used();
17 } 17 }
18 18
19 int SkIntersections::intersect(const SkDConic& conic, const SkDQuad& quad) { 19 int SkIntersections::intersect(const SkDConic& conic, const SkDQuad& quad) {
20 SkTSect<SkDConic, SkDQuad> sect1(conic 20 SkTSect<SkDConic, SkDQuad> sect1(conic
21 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 21 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
22 SkTSect<SkDQuad, SkDConic> sect2(quad 22 SkTSect<SkDQuad, SkDConic> sect2(quad
23 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 23 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
24 SkTSect<SkDConic, SkDQuad>::BinarySearch(&sect1, &sect2, this); 24 SkTSect<SkDConic, SkDQuad>::BinarySearch(&sect1, &sect2, this);
25 return used(); 25 return used();
26 } 26 }
27 27
28 int SkIntersections::intersect(const SkDConic& conic1, const SkDConic& conic2) { 28 int SkIntersections::intersect(const SkDConic& conic1, const SkDConic& conic2) {
29 SkTSect<SkDConic, SkDConic> sect1(conic1 29 SkTSect<SkDConic, SkDConic> sect1(conic1
30 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 30 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
31 SkTSect<SkDConic, SkDConic> sect2(conic2 31 SkTSect<SkDConic, SkDConic> sect2(conic2
32 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 32 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
33 SkTSect<SkDConic, SkDConic>::BinarySearch(&sect1, &sect2, this); 33 SkTSect<SkDConic, SkDConic>::BinarySearch(&sect1, &sect2, this);
34 return used(); 34 return used();
35 } 35 }
36 36
37 int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) { 37 int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) {
38 SkTSect<SkDCubic, SkDQuad> sect1(cubic 38 SkTSect<SkDCubic, SkDQuad> sect1(cubic
39 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 39 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
40 SkTSect<SkDQuad, SkDCubic> sect2(quad 40 SkTSect<SkDQuad, SkDCubic> sect2(quad
41 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 41 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
42 SkTSect<SkDCubic, SkDQuad>::BinarySearch(&sect1, &sect2, this); 42 SkTSect<SkDCubic, SkDQuad>::BinarySearch(&sect1, &sect2, this);
43 return used(); 43 return used();
44 } 44 }
45 45
46 int SkIntersections::intersect(const SkDCubic& cubic, const SkDConic& conic) { 46 int SkIntersections::intersect(const SkDCubic& cubic, const SkDConic& conic) {
47 SkTSect<SkDCubic, SkDConic> sect1(cubic 47 SkTSect<SkDCubic, SkDConic> sect1(cubic
48 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 48 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
49 SkTSect<SkDConic, SkDCubic> sect2(conic 49 SkTSect<SkDConic, SkDCubic> sect2(conic
50 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 50 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
51 SkTSect<SkDCubic, SkDConic>::BinarySearch(&sect1, &sect2, this); 51 SkTSect<SkDCubic, SkDConic>::BinarySearch(&sect1, &sect2, this);
52 return used(); 52 return used();
53 } 53 }
54 54
55 int SkIntersections::intersect(const SkDCubic& cubic1, const SkDCubic& cubic2) { 55 int SkIntersections::intersect(const SkDCubic& cubic1, const SkDCubic& cubic2) {
56 SkTSect<SkDCubic, SkDCubic> sect1(cubic1 56 SkTSect<SkDCubic, SkDCubic> sect1(cubic1
57 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 57 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1));
58 SkTSect<SkDCubic, SkDCubic> sect2(cubic2 58 SkTSect<SkDCubic, SkDCubic> sect2(cubic2
59 SkDEBUGPARAMS(debugGlobalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 59 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2));
60 SkTSect<SkDCubic, SkDCubic>::BinarySearch(&sect1, &sect2, this); 60 SkTSect<SkDCubic, SkDCubic>::BinarySearch(&sect1, &sect2, this);
61 return used(); 61 return used();
62 } 62 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | src/pathops/SkPathOpsTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698