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

Side by Side Diff: samplecode/SamplePictFile.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 | « samplecode/SamplePdfFileViewer.cpp ('k') | samplecode/SampleSubpixelTranslate.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 2011 Google Inc. 2 * Copyright 2011 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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkDumpCanvas.h" 9 #include "SkDumpCanvas.h"
10 #include "SkView.h" 10 #include "SkView.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 if (NULL == pic) { 187 if (NULL == pic) {
188 return NULL; 188 return NULL;
189 } 189 }
190 190
191 SkAutoTDelete<SkBBHFactory> factory; 191 SkAutoTDelete<SkBBHFactory> factory;
192 switch (bbox) { 192 switch (bbox) {
193 case kNo_BBoxType: 193 case kNo_BBoxType:
194 // no bbox playback necessary 194 // no bbox playback necessary
195 return pic.detach(); 195 return pic.detach();
196 case kRTree_BBoxType: 196 case kRTree_BBoxType:
197 factory.reset(SkNEW(SkRTreeFactory)); 197 factory.reset(new SkRTreeFactory);
198 break; 198 break;
199 default: 199 default:
200 SkASSERT(false); 200 SkASSERT(false);
201 } 201 }
202 202
203 SkPictureRecorder recorder; 203 SkPictureRecorder recorder;
204 pic->playback(recorder.beginRecording(pic->cullRect().width(), 204 pic->playback(recorder.beginRecording(pic->cullRect().width(),
205 pic->cullRect().height(), 205 pic->cullRect().height(),
206 factory.get(), 0)); 206 factory.get(), 0));
207 return recorder.endRecording(); 207 return recorder.endRecording();
208 } 208 }
209 209
210 typedef SampleView INHERITED; 210 typedef SampleView INHERITED;
211 }; 211 };
212 212
213 SampleView* CreateSamplePictFileView(const char filename[]); 213 SampleView* CreateSamplePictFileView(const char filename[]);
214 SampleView* CreateSamplePictFileView(const char filename[]) { 214 SampleView* CreateSamplePictFileView(const char filename[]) {
215 return new PictFileView(filename); 215 return new PictFileView(filename);
216 } 216 }
217 217
218 ////////////////////////////////////////////////////////////////////////////// 218 //////////////////////////////////////////////////////////////////////////////
219 219
220 #if 0 220 #if 0
221 static SkView* MyFactory() { return new PictFileView; } 221 static SkView* MyFactory() { return new PictFileView; }
222 static SkViewRegister reg(MyFactory); 222 static SkViewRegister reg(MyFactory);
223 #endif 223 #endif
OLDNEW
« no previous file with comments | « samplecode/SamplePdfFileViewer.cpp ('k') | samplecode/SampleSubpixelTranslate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698