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

Side by Side Diff: gm/bitmapscroll.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 | « gm/bitmaprecttest.cpp ('k') | gm/bitmapshader.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 "gm.h" 8 #include "gm.h"
9 9
10 namespace skiagm { 10 namespace skiagm {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 make_bitmap(quarterWidth, quarterHeight, &origBitmap); 52 make_bitmap(quarterWidth, quarterHeight, &origBitmap);
53 } 53 }
54 54
55 public: 55 public:
56 BitmapScrollGM() { 56 BitmapScrollGM() {
57 fInited = false; 57 fInited = false;
58 this->setBGColor(0xFFDDDDDD); 58 this->setBGColor(0xFFDDDDDD);
59 } 59 }
60 60
61 protected: 61 protected:
62 SkString onShortName() SK_OVERRIDE { 62 SkString onShortName() override {
63 return SkString("bitmapscroll"); 63 return SkString("bitmapscroll");
64 } 64 }
65 65
66 SkISize onISize() SK_OVERRIDE { 66 SkISize onISize() override {
67 return SkISize::Make(800, 600); 67 return SkISize::Make(800, 600);
68 } 68 }
69 69
70 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 70 void onDraw(SkCanvas* canvas) override {
71 this->init(); 71 this->init();
72 SkIRect scrollCenterRegion = SkIRect::MakeXYWH( 72 SkIRect scrollCenterRegion = SkIRect::MakeXYWH(
73 quarterWidth, quarterHeight, quarterWidth*2+1, quarterHeight*2+1); 73 quarterWidth, quarterHeight, quarterWidth*2+1, quarterHeight*2+1);
74 int x = quarterWidth; 74 int x = quarterWidth;
75 int y = quarterHeight; 75 int y = quarterHeight;
76 int xSpacing = quarterWidth * 20; 76 int xSpacing = quarterWidth * 20;
77 int ySpacing = quarterHeight * 16; 77 int ySpacing = quarterHeight * 16;
78 78
79 // Draw left-hand text labels. 79 // Draw left-hand text labels.
80 drawLabel(canvas, "scroll entire bitmap", 80 drawLabel(canvas, "scroll entire bitmap",
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 static const int quarterHeight = 14; 146 static const int quarterHeight = 14;
147 SkBitmap origBitmap; 147 SkBitmap origBitmap;
148 }; 148 };
149 149
150 ////////////////////////////////////////////////////////////////////////////// 150 //////////////////////////////////////////////////////////////////////////////
151 151
152 static GM* MyFactory(void*) { return new BitmapScrollGM; } 152 static GM* MyFactory(void*) { return new BitmapScrollGM; }
153 static GMRegistry reg(MyFactory); 153 static GMRegistry reg(MyFactory);
154 154
155 } 155 }
OLDNEW
« no previous file with comments | « gm/bitmaprecttest.cpp ('k') | gm/bitmapshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698