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

Side by Side Diff: gm/filterbitmap.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/filltypespersp.cpp ('k') | gm/filterindiabox.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 9
10 #include "Resources.h" 10 #include "Resources.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SkBitmap fBM; 63 SkBitmap fBM;
64 SkMatrix fMatrix[3]; 64 SkMatrix fMatrix[3];
65 SkString fName; 65 SkString fName;
66 66
67 FilterBitmapGM() 67 FilterBitmapGM()
68 { 68 {
69 this->setBGColor(0xFFDDDDDD); 69 this->setBGColor(0xFFDDDDDD);
70 } 70 }
71 71
72 protected: 72 protected:
73 virtual uint32_t onGetFlags() const SK_OVERRIDE { 73 uint32_t onGetFlags() const SK_OVERRIDE {
74 return kSkipTiled_Flag; 74 return kSkipTiled_Flag;
75 } 75 }
76 76
77 virtual SkString onShortName() SK_OVERRIDE { 77 SkString onShortName() SK_OVERRIDE {
78 return fName; 78 return fName;
79 } 79 }
80 80
81 virtual SkISize onISize() SK_OVERRIDE { 81 SkISize onISize() SK_OVERRIDE {
82 return SkISize::Make(1024, 768); 82 return SkISize::Make(1024, 768);
83 } 83 }
84 84
85 virtual void makeBitmap() = 0; 85 virtual void makeBitmap() = 0;
86 virtual SkScalar getScale() = 0; 86 virtual SkScalar getScale() = 0;
87 87
88 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 88 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
89 89
90 canvas->translate(10, 10); 90 canvas->translate(10, 10);
91 for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrix); ++i) { 91 for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrix); ++i) {
92 SkSize size = computeSize(fBM, fMatrix[i]); 92 SkSize size = computeSize(fBM, fMatrix[i]);
93 size.fWidth += 20; 93 size.fWidth += 20;
94 size.fHeight += 20; 94 size.fHeight += 20;
95 95
96 draw_row(canvas, fBM, fMatrix[i], size.fWidth); 96 draw_row(canvas, fBM, fMatrix[i], size.fWidth);
97 canvas->translate(0, size.fHeight); 97 canvas->translate(0, size.fHeight);
98 } 98 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 DEF_GM( return new FilterBitmapCheckerboardGM(32,8); ) 222 DEF_GM( return new FilterBitmapCheckerboardGM(32,8); )
223 DEF_GM( return new FilterBitmapCheckerboardGM(32,2); ) 223 DEF_GM( return new FilterBitmapCheckerboardGM(32,2); )
224 DEF_GM( return new FilterBitmapCheckerboardGM(192,192); ) 224 DEF_GM( return new FilterBitmapCheckerboardGM(192,192); )
225 DEF_GM( return new FilterBitmapImageGM("mandrill_16.png"); ) 225 DEF_GM( return new FilterBitmapImageGM("mandrill_16.png"); )
226 DEF_GM( return new FilterBitmapImageGM("mandrill_32.png"); ) 226 DEF_GM( return new FilterBitmapImageGM("mandrill_32.png"); )
227 DEF_GM( return new FilterBitmapImageGM("mandrill_64.png"); ) 227 DEF_GM( return new FilterBitmapImageGM("mandrill_64.png"); )
228 DEF_GM( return new FilterBitmapImageGM("mandrill_128.png"); ) 228 DEF_GM( return new FilterBitmapImageGM("mandrill_128.png"); )
229 DEF_GM( return new FilterBitmapImageGM("mandrill_256.png"); ) 229 DEF_GM( return new FilterBitmapImageGM("mandrill_256.png"); )
230 DEF_GM( return new FilterBitmapImageGM("mandrill_512.png"); ) 230 DEF_GM( return new FilterBitmapImageGM("mandrill_512.png"); )
231 DEF_GM( return new FilterBitmapImageGM("color_wheel.png"); ) 231 DEF_GM( return new FilterBitmapImageGM("color_wheel.png"); )
OLDNEW
« no previous file with comments | « gm/filltypespersp.cpp ('k') | gm/filterindiabox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698