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

Side by Side Diff: gm/gradientDirtyLaundry.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/gmmain.cpp ('k') | gm/gradient_matrix.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 /////////////////////////////////////////////////////////////////////////////// 64 ///////////////////////////////////////////////////////////////////////////////
65 65
66 class GradientsGM : public GM { 66 class GradientsGM : public GM {
67 public: 67 public:
68 GradientsGM() { 68 GradientsGM() {
69 this->setBGColor(0xFFDDDDDD); 69 this->setBGColor(0xFFDDDDDD);
70 } 70 }
71 71
72 protected: 72 protected:
73 SkString onShortName() SK_OVERRIDE { return SkString("gradient_dirty_laundry "); } 73 SkString onShortName() SK_OVERRIDE { return SkString("gradient_dirty_laundry "); }
74 virtual SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 615); } 74 SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 615); }
75 75
76 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 76 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
77 SkPoint pts[2] = { { 0, 0 }, 77 SkPoint pts[2] = { { 0, 0 },
78 { SkIntToScalar(100), SkIntToScalar(100) } 78 { SkIntToScalar(100), SkIntToScalar(100) }
79 }; 79 };
80 SkShader::TileMode tm = SkShader::kClamp_TileMode; 80 SkShader::TileMode tm = SkShader::kClamp_TileMode;
81 SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(100) }; 81 SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(100) };
82 SkPaint paint; 82 SkPaint paint;
83 paint.setAntiAlias(true); 83 paint.setAntiAlias(true);
84 84
85 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); 85 canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
86 for (size_t i = 0; i < SK_ARRAY_COUNT(gGradData); i++) { 86 for (size_t i = 0; i < SK_ARRAY_COUNT(gGradData); i++) {
(...skipping 10 matching lines...) Expand all
97 } 97 }
98 98
99 private: 99 private:
100 typedef GM INHERITED; 100 typedef GM INHERITED;
101 }; 101 };
102 102
103 /////////////////////////////////////////////////////////////////////////////// 103 ///////////////////////////////////////////////////////////////////////////////
104 104
105 static GM* MyFactory(void*) { return new GradientsGM; } 105 static GM* MyFactory(void*) { return new GradientsGM; }
106 static GMRegistry reg(MyFactory); 106 static GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/gmmain.cpp ('k') | gm/gradient_matrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698