| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "SkAddIntersections.h" | 7 #include "SkAddIntersections.h" |
| 8 #include "SkOpCoincidence.h" | 8 #include "SkOpCoincidence.h" |
| 9 #include "SkOpEdgeBuilder.h" | 9 #include "SkOpEdgeBuilder.h" |
| 10 #include "SkPathOpsCommon.h" | 10 #include "SkPathOpsCommon.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 #define DEBUGGING_PATHOPS_FROM_HOST 0 // enable to debug svg in chrome -- note
path hardcoded below | 201 #define DEBUGGING_PATHOPS_FROM_HOST 0 // enable to debug svg in chrome -- note
path hardcoded below |
| 202 #if DEBUGGING_PATHOPS_FROM_HOST | 202 #if DEBUGGING_PATHOPS_FROM_HOST |
| 203 #include "SkData.h" | 203 #include "SkData.h" |
| 204 #include "SkStream.h" | 204 #include "SkStream.h" |
| 205 | 205 |
| 206 static void dump_path(FILE* file, const SkPath& path, bool force, bool dumpAsHex
) { | 206 static void dump_path(FILE* file, const SkPath& path, bool force, bool dumpAsHex
) { |
| 207 SkDynamicMemoryWStream wStream; | 207 SkDynamicMemoryWStream wStream; |
| 208 path.dump(&wStream, force, dumpAsHex); | 208 path.dump(&wStream, force, dumpAsHex); |
| 209 sk_sp<SkData> data(wStream.copyToData()); | 209 sk_sp<SkData> data(wStream.detachAsData()); |
| 210 fprintf(file, "%.*s\n", (int) data->size(), data->data()); | 210 fprintf(file, "%.*s\n", (int) data->size(), data->data()); |
| 211 } | 211 } |
| 212 | 212 |
| 213 static int dumpID = 0; | 213 static int dumpID = 0; |
| 214 | 214 |
| 215 static void dump_op(const SkPath& one, const SkPath& two, SkPathOp op) { | 215 static void dump_op(const SkPath& one, const SkPath& two, SkPathOp op) { |
| 216 #if SK_BUILD_FOR_MAC | 216 #if SK_BUILD_FOR_MAC |
| 217 FILE* file = fopen("/Users/caryclark/Documents/svgop.txt", "w"); | 217 FILE* file = fopen("/Users/caryclark/Documents/svgop.txt", "w"); |
| 218 #else | 218 #else |
| 219 FILE* file = fopen("/usr/local/google/home/caryclark/Documents/svgop.txt", "
w"); | 219 FILE* file = fopen("/usr/local/google/home/caryclark/Documents/svgop.txt", "
w"); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 one.dumpHex(); | 463 one.dumpHex(); |
| 464 SkDebugf("two: fill=%d\n", two.getFillType()); | 464 SkDebugf("two: fill=%d\n", two.getFillType()); |
| 465 two.dumpHex(); | 465 two.dumpHex(); |
| 466 SkASSERT(0); | 466 SkASSERT(0); |
| 467 } | 467 } |
| 468 return true; | 468 return true; |
| 469 #else | 469 #else |
| 470 return OpDebug(one, two, op, result SkDEBUGPARAMS(true) SkDEBUGPARAMS(nullp
tr)); | 470 return OpDebug(one, two, op, result SkDEBUGPARAMS(true) SkDEBUGPARAMS(nullp
tr)); |
| 471 #endif | 471 #endif |
| 472 } | 472 } |
| OLD | NEW |