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

Side by Side Diff: gm/extractbitmap.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 | « gm/etc1bitmap.cpp ('k') | gm/factory.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 "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 14 matching lines...) Expand all
25 paint.setColor(SK_ColorBLUE); 25 paint.setColor(SK_ColorBLUE);
26 canvas.drawCircle(SkIntToScalar(W)/2, SkIntToScalar(H)/2, SkIntToScalar(W)/2 , paint); 26 canvas.drawCircle(SkIntToScalar(W)/2, SkIntToScalar(H)/2, SkIntToScalar(W)/2 , paint);
27 } 27 }
28 28
29 class ExtractBitmapGM : public GM { 29 class ExtractBitmapGM : public GM {
30 public: 30 public:
31 ExtractBitmapGM() {} 31 ExtractBitmapGM() {}
32 32
33 protected: 33 protected:
34 // overrides from SkEventSink 34 // overrides from SkEventSink
35 virtual SkString onShortName() SK_OVERRIDE { 35 SkString onShortName() SK_OVERRIDE {
36 return SkString("extractbitmap"); 36 return SkString("extractbitmap");
37 } 37 }
38 38
39 virtual SkISize onISize() SK_OVERRIDE { 39 SkISize onISize() SK_OVERRIDE {
40 return SkISize::Make(600, 600); 40 return SkISize::Make(600, 600);
41 } 41 }
42 42
43 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 43 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
44 SkBitmap bitmap; 44 SkBitmap bitmap;
45 create_bitmap(&bitmap); 45 create_bitmap(&bitmap);
46 int x = bitmap.width() / 2; 46 int x = bitmap.width() / 2;
47 int y = bitmap.height() / 2; 47 int y = bitmap.height() / 2;
48 48
49 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); 49 canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
50 50
51 canvas->drawBitmap(bitmap, 0, 0); 51 canvas->drawBitmap(bitmap, 0, 0);
52 52
53 { 53 {
(...skipping 23 matching lines...) Expand all
77 private: 77 private:
78 typedef GM INHERITED; 78 typedef GM INHERITED;
79 }; 79 };
80 80
81 ////////////////////////////////////////////////////////////////////////////// 81 //////////////////////////////////////////////////////////////////////////////
82 82
83 static GM* MyFactory(void*) { return new ExtractBitmapGM; } 83 static GM* MyFactory(void*) { return new ExtractBitmapGM; }
84 static GMRegistry reg(MyFactory); 84 static GMRegistry reg(MyFactory);
85 85
86 } 86 }
OLDNEW
« no previous file with comments | « gm/etc1bitmap.cpp ('k') | gm/factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698