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

Side by Side Diff: samplecode/SampleIdentityScale.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/SampleFatBits.cpp ('k') | samplecode/SampleLayers.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 2014 Google Inc. 2 * Copyright 2014 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 "gm.h" 8 #include "gm.h"
9 9
10 #include "Resources.h" 10 #include "Resources.h"
(...skipping 25 matching lines...) Expand all
36 } else { 36 } else {
37 fBM.allocN32Pixels(1, 1); 37 fBM.allocN32Pixels(1, 1);
38 *(fBM.getAddr32(0,0)) = 0xFF0000FF; // red == bad 38 *(fBM.getAddr32(0,0)) = 0xFF0000FF; // red == bad
39 } 39 }
40 } 40 }
41 41
42 protected: 42 protected:
43 SkBitmap fBM; 43 SkBitmap fBM;
44 44
45 // overrides from SkEventSink 45 // overrides from SkEventSink
46 virtual bool onQuery(SkEvent* evt) SK_OVERRIDE { 46 bool onQuery(SkEvent* evt) SK_OVERRIDE {
47 if (SampleCode::TitleQ(*evt)) { 47 if (SampleCode::TitleQ(*evt)) {
48 SampleCode::TitleR(evt, "IdentityScale"); 48 SampleCode::TitleR(evt, "IdentityScale");
49 return true; 49 return true;
50 } 50 }
51 return this->INHERITED::onQuery(evt); 51 return this->INHERITED::onQuery(evt);
52 } 52 }
53 53
54 virtual void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { 54 void onDrawContent(SkCanvas* canvas) SK_OVERRIDE {
55 55
56 SkPaint paint; 56 SkPaint paint;
57 57
58 paint.setAntiAlias(true); 58 paint.setAntiAlias(true);
59 paint.setTextSize(48); 59 paint.setTextSize(48);
60 paint.setFilterLevel(SkPaint::kHigh_FilterLevel); 60 paint.setFilterLevel(SkPaint::kHigh_FilterLevel);
61 61
62 SkTime::DateTime time; 62 SkTime::DateTime time;
63 SkTime::GetDateTime(&time); 63 SkTime::GetDateTime(&time);
64 64
(...skipping 18 matching lines...) Expand all
83 } 83 }
84 84
85 private: 85 private:
86 typedef SampleView INHERITED; 86 typedef SampleView INHERITED;
87 }; 87 };
88 88
89 ////////////////////////////////////////////////////////////////////////////// 89 //////////////////////////////////////////////////////////////////////////////
90 90
91 static SkView* MyFactory() { return new IdentityScaleView("mandrill_256.png"); } 91 static SkView* MyFactory() { return new IdentityScaleView("mandrill_256.png"); }
92 static SkViewRegister reg(MyFactory); 92 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleFatBits.cpp ('k') | samplecode/SampleLayers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698