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

Side by Side Diff: samplecode/SampleArc.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/SampleApp.cpp ('k') | samplecode/SampleHT.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 "SkAnimTimer.h" 9 #include "SkAnimTimer.h"
10 #include "SkView.h" 10 #include "SkView.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 MyDrawable* fAnimatingDrawable; 85 MyDrawable* fAnimatingDrawable;
86 SkDrawable* fRootDrawable; 86 SkDrawable* fRootDrawable;
87 87
88 ArcsView() { 88 ArcsView() {
89 testparse(); 89 testparse();
90 fSweep = SkIntToScalar(100); 90 fSweep = SkIntToScalar(100);
91 this->setBGColor(0xFFDDDDDD); 91 this->setBGColor(0xFFDDDDDD);
92 92
93 fRect.set(0, 0, SkIntToScalar(200), SkIntToScalar(200)); 93 fRect.set(0, 0, SkIntToScalar(200), SkIntToScalar(200));
94 fRect.offset(SkIntToScalar(20), SkIntToScalar(20)); 94 fRect.offset(SkIntToScalar(20), SkIntToScalar(20));
95 fAnimatingDrawable = SkNEW_ARGS(MyDrawable, (fRect)); 95 fAnimatingDrawable = new MyDrawable(fRect);
96 96
97 SkPictureRecorder recorder; 97 SkPictureRecorder recorder;
98 this->drawRoot(recorder.beginRecording(SkRect::MakeWH(800, 500))); 98 this->drawRoot(recorder.beginRecording(SkRect::MakeWH(800, 500)));
99 fRootDrawable = recorder.endRecordingAsDrawable(); 99 fRootDrawable = recorder.endRecordingAsDrawable();
100 } 100 }
101 101
102 ~ArcsView() override { 102 ~ArcsView() override {
103 fAnimatingDrawable->unref(); 103 fAnimatingDrawable->unref();
104 fRootDrawable->unref(); 104 fRootDrawable->unref();
105 } 105 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 private: 211 private:
212 SkScalar fSweep; 212 SkScalar fSweep;
213 213
214 typedef SampleView INHERITED; 214 typedef SampleView INHERITED;
215 }; 215 };
216 216
217 ////////////////////////////////////////////////////////////////////////////// 217 //////////////////////////////////////////////////////////////////////////////
218 218
219 static SkView* MyFactory() { return new ArcsView; } 219 static SkView* MyFactory() { return new ArcsView; }
220 static SkViewRegister reg(MyFactory); 220 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleHT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698