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

Side by Side Diff: samplecode/SampleArc.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/SampleChart.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = SkNEW_ARGS(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.EXPERIMENTAL_endRecordingAsDrawable(); 99 fRootDrawable = recorder.EXPERIMENTAL_endRecordingAsDrawable();
100 } 100 }
101 101
102 virtual ~ArcsView() SK_OVERRIDE { 102 ~ArcsView() SK_OVERRIDE {
103 fAnimatingDrawable->unref(); 103 fAnimatingDrawable->unref();
104 fRootDrawable->unref(); 104 fRootDrawable->unref();
105 } 105 }
106 106
107 protected: 107 protected:
108 // overrides from SkEventSink 108 // overrides from SkEventSink
109 bool onQuery(SkEvent* evt) SK_OVERRIDE { 109 bool onQuery(SkEvent* evt) SK_OVERRIDE {
110 if (SampleCode::TitleQ(*evt)) { 110 if (SampleCode::TitleQ(*evt)) {
111 SampleCode::TitleR(evt, "Arcs"); 111 SampleCode::TitleR(evt, "Arcs");
112 return true; 112 return true;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 private: 209 private:
210 SkScalar fSweep; 210 SkScalar fSweep;
211 211
212 typedef SampleView INHERITED; 212 typedef SampleView INHERITED;
213 }; 213 };
214 214
215 ////////////////////////////////////////////////////////////////////////////// 215 //////////////////////////////////////////////////////////////////////////////
216 216
217 static SkView* MyFactory() { return new ArcsView; } 217 static SkView* MyFactory() { return new ArcsView; }
218 static SkViewRegister reg(MyFactory); 218 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleChart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698