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

Side by Side Diff: gm/shadertext.cpp

Issue 815883002: Cleanup: Another round of override fixes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: revert include changes Created 6 years 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/shaderbounds.cpp ('k') | gm/shadertext2.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 public: 88 public:
89 ShaderTextGM() { 89 ShaderTextGM() {
90 this->setBGColor(0xFFDDDDDD); 90 this->setBGColor(0xFFDDDDDD);
91 } 91 }
92 92
93 protected: 93 protected:
94 virtual uint32_t onGetFlags() const SK_OVERRIDE { 94 virtual uint32_t onGetFlags() const SK_OVERRIDE {
95 return kSkipTiled_Flag; 95 return kSkipTiled_Flag;
96 } 96 }
97 97
98 SkString onShortName() { 98 SkString onShortName() SK_OVERRIDE {
99 return SkString("shadertext"); 99 return SkString("shadertext");
100 } 100 }
101 101
102 SkISize onISize() { return SkISize::Make(1450, 500); } 102 SkISize onISize() SK_OVERRIDE { return SkISize::Make(1450, 500); }
103 103
104 virtual void onDraw(SkCanvas* canvas) { 104 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
105 const char text[] = "Shaded Text"; 105 const char text[] = "Shaded Text";
106 const int textLen = SK_ARRAY_COUNT(text) - 1; 106 const int textLen = SK_ARRAY_COUNT(text) - 1;
107 const int pointSize = 36; 107 const int pointSize = 36;
108 108
109 const int w = pointSize * textLen; 109 const int w = pointSize * textLen;
110 const int h = pointSize; 110 const int h = pointSize;
111 111
112 SkPoint pts[2] = { 112 SkPoint pts[2] = {
113 { 0, 0 }, 113 { 0, 0 },
114 { SkIntToScalar(w), SkIntToScalar(h) } 114 { SkIntToScalar(w), SkIntToScalar(h) }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 private: 186 private:
187 typedef GM INHERITED; 187 typedef GM INHERITED;
188 }; 188 };
189 189
190 /////////////////////////////////////////////////////////////////////////////// 190 ///////////////////////////////////////////////////////////////////////////////
191 191
192 static GM* MyFactory(void*) { return new ShaderTextGM; } 192 static GM* MyFactory(void*) { return new ShaderTextGM; }
193 static GMRegistry reg(MyFactory); 193 static GMRegistry reg(MyFactory);
194 } 194 }
OLDNEW
« no previous file with comments | « gm/shaderbounds.cpp ('k') | gm/shadertext2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698