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

Side by Side Diff: samplecode/SampleLines.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/SampleLayers.cpp ('k') | samplecode/SampleLua.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 "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // y += SK_Scalar1/2; 90 // y += SK_Scalar1/2;
91 91
92 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); 92 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt);
93 93
94 paint.setAntiAlias(true); // with anti-aliasing 94 paint.setAntiAlias(true); // with anti-aliasing
95 y += SkIntToScalar(10); 95 y += SkIntToScalar(10);
96 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); 96 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt);
97 } 97 }
98 98
99 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERR IDE { 99 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override {
100 fAlpha = SkScalarRoundToInt(y); 100 fAlpha = SkScalarRoundToInt(y);
101 this->inval(NULL); 101 this->inval(NULL);
102 return NULL; 102 return NULL;
103 } 103 }
104 private: 104 private:
105 105
106 int fAlpha; 106 int fAlpha;
107 typedef SampleView INHERITED; 107 typedef SampleView INHERITED;
108 }; 108 };
109 109
110 ////////////////////////////////////////////////////////////////////////////// 110 //////////////////////////////////////////////////////////////////////////////
111 111
112 static SkView* MyFactory() { return new LinesView; } 112 static SkView* MyFactory() { return new LinesView; }
113 static SkViewRegister reg(MyFactory); 113 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleLayers.cpp ('k') | samplecode/SampleLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698