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

Side by Side Diff: samplecode/SampleManyRects.cpp

Issue 1232463006: Fix up -Winconsistent-missing-override (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: llvm_coverage_build Created 5 years, 5 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/SampleLines.cpp ('k') | samplecode/SamplePatch.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 2013 Google Inc. 3 * Copyright 2013 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 16 matching lines...) Expand all
27 27
28 protected: 28 protected:
29 bool onQuery(SkEvent* evt) override { 29 bool onQuery(SkEvent* evt) override {
30 if (SampleCode::TitleQ(*evt)) { 30 if (SampleCode::TitleQ(*evt)) {
31 SampleCode::TitleR(evt, "ManyRects"); 31 SampleCode::TitleR(evt, "ManyRects");
32 return true; 32 return true;
33 } 33 }
34 return this->INHERITED::onQuery(evt); 34 return this->INHERITED::onQuery(evt);
35 } 35 }
36 36
37 virtual void onDrawContent(SkCanvas* canvas) { 37 void onDrawContent(SkCanvas* canvas) override {
38 SkISize dsize = canvas->getDeviceSize(); 38 SkISize dsize = canvas->getDeviceSize();
39 canvas->clear(0xFFF0E0F0); 39 canvas->clear(0xFFF0E0F0);
40 40
41 for (int i = 0; i < N; ++i) { 41 for (int i = 0; i < N; ++i) {
42 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 10 0)), 42 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 10 0)),
43 SkIntToScalar(fRandom.nextRangeU(10, 10 0))); 43 SkIntToScalar(fRandom.nextRangeU(10, 10 0)));
44 int x = fRandom.nextRangeU(0, dsize.fWidth); 44 int x = fRandom.nextRangeU(0, dsize.fWidth);
45 int y = fRandom.nextRangeU(0, dsize.fHeight); 45 int y = fRandom.nextRangeU(0, dsize.fHeight);
46 canvas->save(); 46 canvas->save();
47 47
(...skipping 22 matching lines...) Expand all
70 70
71 private: 71 private:
72 SkRandom fRandom; 72 SkRandom fRandom;
73 typedef SampleView INHERITED; 73 typedef SampleView INHERITED;
74 }; 74 };
75 75
76 ////////////////////////////////////////////////////////////////////////////// 76 //////////////////////////////////////////////////////////////////////////////
77 77
78 static SkView* MyFactory() { return new ManyRectsView; } 78 static SkView* MyFactory() { return new ManyRectsView; }
79 static SkViewRegister reg(MyFactory); 79 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleLines.cpp ('k') | samplecode/SamplePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698