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

Side by Side Diff: src/svg/skp2svg.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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/svg/SkSVGDevice.cpp ('k') | src/utils/SkCamera.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 2015 Google Inc. 2 * Copyright 2015 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 "LazyDecodeBitmap.h" 8 #include "LazyDecodeBitmap.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(&stream, &sk_tools:: LazyDecodeBitmap)); 40 SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(&stream, &sk_tools:: LazyDecodeBitmap));
41 if (!SkToBool(pic.get())) { 41 if (!SkToBool(pic.get())) {
42 SkDebugf("Could not load SKP: %s\n", FLAGS_input[0]); 42 SkDebugf("Could not load SKP: %s\n", FLAGS_input[0]);
43 return kNotAnSKP; 43 return kNotAnSKP;
44 } 44 }
45 45
46 SkAutoTDelete<SkWStream> outStream; 46 SkAutoTDelete<SkWStream> outStream;
47 if (FLAGS_output.count() > 0) { 47 if (FLAGS_output.count() > 0) {
48 SkFILEWStream* fileStream = SkNEW_ARGS(SkFILEWStream, (FLAGS_output[0])) ; 48 SkFILEWStream* fileStream = new SkFILEWStream(FLAGS_output[0]);
49 if (!fileStream->isValid()) { 49 if (!fileStream->isValid()) {
50 SkDebugf("Couldn't open output file for writing: %s\n", FLAGS_output [0]); 50 SkDebugf("Couldn't open output file for writing: %s\n", FLAGS_output [0]);
51 return kIOError; 51 return kIOError;
52 } 52 }
53 outStream.reset(fileStream); 53 outStream.reset(fileStream);
54 } else { 54 } else {
55 outStream.reset(SkNEW(SkDebugWStream)); 55 outStream.reset(new SkDebugWStream);
56 } 56 }
57 57
58 SkAutoTDelete<SkXMLWriter> xmlWriter(SkNEW_ARGS(SkXMLStreamWriter, (outStrea m.get()))); 58 SkAutoTDelete<SkXMLWriter> xmlWriter(new SkXMLStreamWriter(outStream.get())) ;
59 SkAutoTUnref<SkCanvas> svgCanvas(SkSVGCanvas::Create(pic->cullRect(), xmlWri ter.get())); 59 SkAutoTUnref<SkCanvas> svgCanvas(SkSVGCanvas::Create(pic->cullRect(), xmlWri ter.get()));
60 60
61 pic->playback(svgCanvas); 61 pic->playback(svgCanvas);
62 62
63 return kSuccess; 63 return kSuccess;
64 } 64 }
65 65
66 #if !defined SK_BUILD_FOR_IOS 66 #if !defined SK_BUILD_FOR_IOS
67 int main(int argc, char * const argv[]) { 67 int main(int argc, char * const argv[]) {
68 return tool_main(argc, (char**) argv); 68 return tool_main(argc, (char**) argv);
69 } 69 }
70 #endif 70 #endif
OLDNEW
« no previous file with comments | « src/svg/SkSVGDevice.cpp ('k') | src/utils/SkCamera.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698