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

Side by Side Diff: tests/PathOpsTSectDebug.h

Issue 853223002: new files for pathops geometric intersection (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove visualizer tool so cl contains only pure adds Created 5 years, 11 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 | « tests/PathOpsBuilderTest.cpp ('k') | tests/PathOpsThreeWayTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 template<typename TCurve>
11 void SkTSect<TCurve>::dump() const {
12 SkDebugf("id=%d", debugID());
13 const SkTSpan<TCurve>* test = fHead;
14 if (!test) {
15 SkDebugf(" (empty)");
16 return;
17 }
18 do {
19 SkDebugf(" ");
20 test->dump(this);
21 } while ((test = test->next()));
22 }
23
24 template<typename TCurve>
25 void SkTSect<TCurve>::dumpBoth(const SkTSect& opp) const {
26 dump();
27 SkDebugf(" ");
28 opp.dump();
29 SkDebugf("\n");
30 }
31
32 template<typename TCurve>
33 void SkTSect<TCurve>::dumpBoth(const SkTSect* opp) const {
34 dumpBoth(*opp);
35 }
36
37 template<typename TCurve>
38 void SkTSect<TCurve>::dumpCurves() const {
39 const SkTSpan<TCurve>* test = fHead;
40 do {
41 test->fPart.dump();
42 } while ((test = test->next()));
43 }
44
45 #if !DEBUG_T_SECT
46 template<typename TCurve>
47 int SkTSpan<TCurve>::debugID(const SkTSect<TCurve>* sect) const {
48 if (!sect) {
49 return -1;
50 }
51 int id = 1;
52 const SkTSpan* test = sect->fHead;
53 while (test && test != this) {
54 ++id;
55 test = test->fNext;
56 }
57 return id;
58 }
59 #endif
60
61 template<typename TCurve>
62 void SkTSpan<TCurve>::dumpID(const SkTSect<TCurve>* sect) const {
63 if (fCoinStart.isCoincident()) {
64 SkDebugf("%c", '*');
65 }
66 SkDebugf("%d", debugID(sect));
67 if (fCoinEnd.isCoincident()) {
68 SkDebugf("%c", '*');
69 }
70 }
71
72 template<typename TCurve>
73 void SkTSpan<TCurve>::dump(const SkTSect<TCurve>* sect) const {
74 dumpID(sect);
75 SkDebugf("=(%g,%g) [", fStartT, fEndT);
76 for (int index = 0; index < fBounded.count(); ++index) {
77 SkTSpan* span = fBounded[index];
78 span->dumpID(sect);
79 if (index < fBounded.count() - 1) {
80 SkDebugf(",");
81 }
82 }
83 SkDebugf("]");
84 }
OLDNEW
« no previous file with comments | « tests/PathOpsBuilderTest.cpp ('k') | tests/PathOpsThreeWayTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698