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

Side by Side Diff: gm/drawbitmaprect.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/downsamplebitmap.cpp ('k') | gm/drawfilter.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 "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 fName.append(suffix); 134 fName.append(suffix);
135 } 135 }
136 } 136 }
137 137
138 DrawRectRectProc* fProc; 138 DrawRectRectProc* fProc;
139 SkBitmap fLargeBitmap; 139 SkBitmap fLargeBitmap;
140 SkAutoTUnref<SkImage> fImage; 140 SkAutoTUnref<SkImage> fImage;
141 SkString fName; 141 SkString fName;
142 142
143 protected: 143 protected:
144 SkString onShortName() SK_OVERRIDE { return fName; } 144 SkString onShortName() override { return fName; }
145 145
146 SkISize onISize() SK_OVERRIDE { return SkISize::Make(gSize, gSize); } 146 SkISize onISize() override { return SkISize::Make(gSize, gSize); }
147 147
148 void onOnceBeforeDraw() SK_OVERRIDE { 148 void onOnceBeforeDraw() override {
149 fImage.reset(makebm(&fLargeBitmap, gBmpSize, gBmpSize)); 149 fImage.reset(makebm(&fLargeBitmap, gBmpSize, gBmpSize));
150 } 150 }
151 151
152 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 152 void onDraw(SkCanvas* canvas) override {
153 SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)}; 153 SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)};
154 static const int kMaxSrcRectSize = 1 << (SkNextLog2(gBmpSize) + 2); 154 static const int kMaxSrcRectSize = 1 << (SkNextLog2(gBmpSize) + 2);
155 155
156 static const int kPadX = 30; 156 static const int kPadX = 30;
157 static const int kPadY = 40; 157 static const int kPadY = 40;
158 SkPaint paint; 158 SkPaint paint;
159 paint.setAlpha(0x20); 159 paint.setAlpha(0x20);
160 canvas->drawBitmapRect(fLargeBitmap, NULL, 160 canvas->drawBitmapRect(fLargeBitmap, NULL,
161 SkRect::MakeWH(gSize * SK_Scalar1, 161 SkRect::MakeWH(gSize * SK_Scalar1,
162 gSize * SK_Scalar1), 162 gSize * SK_Scalar1),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 } 231 }
232 232
233 private: 233 private:
234 typedef skiagm::GM INHERITED; 234 typedef skiagm::GM INHERITED;
235 }; 235 };
236 236
237 DEF_GM( return new DrawBitmapRectGM(canvasproc, NULL); ) 237 DEF_GM( return new DrawBitmapRectGM(canvasproc, NULL); )
238 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); ) 238 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); )
239 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); ) 239 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); )
OLDNEW
« no previous file with comments | « gm/downsamplebitmap.cpp ('k') | gm/drawfilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698