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

Side by Side Diff: gm/verylargebitmap.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/verttext2.cpp ('k') | gm/xfermodeimagefilter.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 2012 Google Inc. 2 * Copyright 2012 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // exercises bitmapshader 52 // exercises bitmapshader
53 canvas->drawBitmapRect(bm, NULL, r, NULL); 53 canvas->drawBitmapRect(bm, NULL, r, NULL);
54 canvas->drawRect(r, paint); 54 canvas->drawRect(r, paint);
55 } 55 }
56 56
57 class VeryLargeBitmapGM : public skiagm::GM { 57 class VeryLargeBitmapGM : public skiagm::GM {
58 public: 58 public:
59 VeryLargeBitmapGM() {} 59 VeryLargeBitmapGM() {}
60 60
61 protected: 61 protected:
62 virtual SkString onShortName() SK_OVERRIDE { 62 SkString onShortName() SK_OVERRIDE {
63 return SkString("verylargebitmap"); 63 return SkString("verylargebitmap");
64 } 64 }
65 65
66 virtual SkISize onISize() SK_OVERRIDE { 66 SkISize onISize() SK_OVERRIDE {
67 return SkISize::Make(500, 600); 67 return SkISize::Make(500, 600);
68 } 68 }
69 69
70 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 70 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
71 int veryBig = 65*1024; // 64K < size 71 int veryBig = 65*1024; // 64K < size
72 int big = 33*1024; // 32K < size < 64K 72 int big = 33*1024; // 32K < size < 64K
73 // smaller than many max texture sizes, but large enough to gpu-tile for memory reasons. 73 // smaller than many max texture sizes, but large enough to gpu-tile for memory reasons.
74 int medium = 5*1024; 74 int medium = 5*1024;
75 int small = 150; 75 int small = 150;
76 76
77 SkColor colors[2]; 77 SkColor colors[2];
78 78
79 canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); 79 canvas->translate(SkIntToScalar(10), SkIntToScalar(10));
80 colors[0] = SK_ColorRED; 80 colors[0] = SK_ColorRED;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 #endif 112 #endif
113 113
114 private: 114 private:
115 typedef skiagm::GM INHERITED; 115 typedef skiagm::GM INHERITED;
116 }; 116 };
117 117
118 ////////////////////////////////////////////////////////////////////////////// 118 //////////////////////////////////////////////////////////////////////////////
119 119
120 static skiagm::GM* MyFactory(void*) { return new VeryLargeBitmapGM; } 120 static skiagm::GM* MyFactory(void*) { return new VeryLargeBitmapGM; }
121 static skiagm::GMRegistry reg(MyFactory); 121 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/verttext2.cpp ('k') | gm/xfermodeimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698