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

Side by Side Diff: samplecode/SampleSubpixelTranslate.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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/SampleStrokePath.cpp ('k') | samplecode/SampleText.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 protected: 47 protected:
48 SkBitmap fBM; 48 SkBitmap fBM;
49 SkScalar fSize; 49 SkScalar fSize;
50 float fHorizontalVelocity, fVerticalVelocity; 50 float fHorizontalVelocity, fVerticalVelocity;
51 51
52 SkPoint fCurPos; 52 SkPoint fCurPos;
53 53
54 // overrides from SkEventSink 54 // overrides from SkEventSink
55 bool onQuery(SkEvent* evt) SK_OVERRIDE { 55 bool onQuery(SkEvent* evt) override {
56 if (SampleCode::TitleQ(*evt)) { 56 if (SampleCode::TitleQ(*evt)) {
57 SampleCode::TitleR(evt, "SubpixelTranslate"); 57 SampleCode::TitleR(evt, "SubpixelTranslate");
58 return true; 58 return true;
59 } 59 }
60 return this->INHERITED::onQuery(evt); 60 return this->INHERITED::onQuery(evt);
61 } 61 }
62 62
63 void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { 63 void onDrawContent(SkCanvas* canvas) override {
64 64
65 static const SkFilterQuality gQualitys[] = { 65 static const SkFilterQuality gQualitys[] = {
66 kNone_SkFilterQuality, 66 kNone_SkFilterQuality,
67 kLow_SkFilterQuality, 67 kLow_SkFilterQuality,
68 kMedium_SkFilterQuality, 68 kMedium_SkFilterQuality,
69 kHigh_SkFilterQuality 69 kHigh_SkFilterQuality
70 }; 70 };
71 71
72 SkPaint paint; 72 SkPaint paint;
73 paint.setTextSize(48); 73 paint.setTextSize(48);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 private: 115 private:
116 typedef SampleView INHERITED; 116 typedef SampleView INHERITED;
117 }; 117 };
118 118
119 ////////////////////////////////////////////////////////////////////////////// 119 //////////////////////////////////////////////////////////////////////////////
120 120
121 static SkView* MyFactory() { return new SubpixelTranslateView("mandrill_256.png" , .05f, .05f); } 121 static SkView* MyFactory() { return new SubpixelTranslateView("mandrill_256.png" , .05f, .05f); }
122 static SkViewRegister reg(MyFactory); 122 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleStrokePath.cpp ('k') | samplecode/SampleText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698