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

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

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 years, 3 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/images/SkImageEncoder.cpp ('k') | src/ports/SkFontHost_win.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 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
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
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 }
OLDNEW
« no previous file with comments | « src/images/SkImageEncoder.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698