1 /* 2 * Copyright 2014 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #include "SkPathOpsTSect.h" 9 10 int SkIntersections::intersect(const SkDQuad& quad1, const SkDQuad& quad2) { 11 SkTSect<SkDQuad, SkDQuad> sect1(quad1 12 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 13 SkTSect<SkDQuad, SkDQuad> sect2(quad2 14 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 15 SkTSect<SkDQuad, SkDQuad>::BinarySearch(§1, §2, this); 16 return used(); 17 } 18 19 int SkIntersections::intersect(const SkDConic& conic, const SkDQuad& quad) { 20 SkTSect<SkDConic, SkDQuad> sect1(conic 21 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 22 SkTSect<SkDQuad, SkDConic> sect2(quad 23 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 24 SkTSect<SkDConic, SkDQuad>::BinarySearch(§1, §2, this); 25 return used(); 26 } 27 28 int SkIntersections::intersect(const SkDConic& conic1, const SkDConic& conic2) { 29 SkTSect<SkDConic, SkDConic> sect1(conic1 30 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 31 SkTSect<SkDConic, SkDConic> sect2(conic2 32 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 33 SkTSect<SkDConic, SkDConic>::BinarySearch(§1, §2, this); 34 return used(); 35 } 36 37 int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) { 38 SkTSect<SkDCubic, SkDQuad> sect1(cubic 39 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 40 SkTSect<SkDQuad, SkDCubic> sect2(quad 41 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 42 SkTSect<SkDCubic, SkDQuad>::BinarySearch(§1, §2, this); 43 return used(); 44 } 45 46 int SkIntersections::intersect(const SkDCubic& cubic, const SkDConic& conic) { 47 SkTSect<SkDCubic, SkDConic> sect1(cubic 48 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 49 SkTSect<SkDConic, SkDCubic> sect2(conic 50 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 51 SkTSect<SkDCubic, SkDConic>::BinarySearch(§1, §2, this); 52 return used(); 53 } 54 55 int SkIntersections::intersect(const SkDCubic& cubic1, const SkDCubic& cubic2) { 56 SkTSect<SkDCubic, SkDCubic> sect1(cubic1 57 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); 58 SkTSect<SkDCubic, SkDCubic> sect2(cubic2 59 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); 60 SkTSect<SkDCubic, SkDCubic>::BinarySearch(§1, §2, this); 61 return used(); 62 } 63