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

Side by Side Diff: gm/shallowgradient.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/shadertext.cpp ('k') | gm/shapes.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 2013 Google Inc. 2 * Copyright 2013 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 "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 SkString onShortName() override { 44 SkString onShortName() override {
45 return fName; 45 return fName;
46 } 46 }
47 47
48 SkISize onISize() override { 48 SkISize onISize() override {
49 return SkISize::Make(800, 800); 49 return SkISize::Make(800, 800);
50 } 50 }
51 51
52 void onDraw(SkCanvas* canvas) override { 52 void onDraw(SkCanvas* canvas) override {
53 const SkColor colors[] = { sk_tool_utils::color_to_565(0xFF555555), 53 const SkColor colors[] = { sk_tool_utils::color_to_565(0xFF555555),
54 sk_tool_utils::color_to_565(0xFF444444) }; 54 sk_tool_utils::color_to_565(0xFF444444) };
55 const int colorCount = SK_ARRAY_COUNT(colors); 55 const int colorCount = SK_ARRAY_COUNT(colors);
56 56
57 SkRect r = { 0, 0, this->width(), this->height() }; 57 SkRect r = { 0, 0, this->width(), this->height() };
58 SkSize size = SkSize::Make(r.width(), r.height()); 58 SkSize size = SkSize::Make(r.width(), r.height());
59 59
60 SkPaint paint; 60 SkPaint paint;
61 paint.setShader(fProc(colors, colorCount, size)); 61 paint.setShader(fProc(colors, colorCount, size));
62 paint.setDither(fDither); 62 paint.setDither(fDither);
63 canvas->drawRect(r, paint); 63 canvas->drawRect(r, paint);
(...skipping 11 matching lines...) Expand all
75 75
76 DEF_GM( return new ShallowGradientGM(shader_linear, "linear", true); ) 76 DEF_GM( return new ShallowGradientGM(shader_linear, "linear", true); )
77 DEF_GM( return new ShallowGradientGM(shader_radial, "radial", true); ) 77 DEF_GM( return new ShallowGradientGM(shader_radial, "radial", true); )
78 DEF_GM( return new ShallowGradientGM(shader_conical, "conical", true); ) 78 DEF_GM( return new ShallowGradientGM(shader_conical, "conical", true); )
79 DEF_GM( return new ShallowGradientGM(shader_sweep, "sweep", true); ) 79 DEF_GM( return new ShallowGradientGM(shader_sweep, "sweep", true); )
80 80
81 DEF_GM( return new ShallowGradientGM(shader_linear, "linear_nodither", false); ) 81 DEF_GM( return new ShallowGradientGM(shader_linear, "linear_nodither", false); )
82 DEF_GM( return new ShallowGradientGM(shader_radial, "radial_nodither", false); ) 82 DEF_GM( return new ShallowGradientGM(shader_radial, "radial_nodither", false); )
83 DEF_GM( return new ShallowGradientGM(shader_conical, "conical_nodither", false); ) 83 DEF_GM( return new ShallowGradientGM(shader_conical, "conical_nodither", false); )
84 DEF_GM( return new ShallowGradientGM(shader_sweep, "sweep_nodither", false); ) 84 DEF_GM( return new ShallowGradientGM(shader_sweep, "sweep_nodither", false); )
OLDNEW
« no previous file with comments | « gm/shadertext.cpp ('k') | gm/shapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698