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

Side by Side Diff: gm/gradients_no_texture.cpp

Issue 1184123002: Revert of make gm background colors 565 compatible (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/gradients_2pt_conical.cpp ('k') | gm/internal_links.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 #include "gm.h" 7 #include "gm.h"
8 #include "SkGradientShader.h" 8 #include "SkGradientShader.h"
9 9
10 using namespace skiagm; 10 using namespace skiagm;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 static const GradMaker gGradMakers[] = { 75 static const GradMaker gGradMakers[] = {
76 MakeLinear, MakeRadial, MakeSweep, Make2Radial, Make2Conical, 76 MakeLinear, MakeRadial, MakeSweep, Make2Radial, Make2Conical,
77 }; 77 };
78 78
79 /////////////////////////////////////////////////////////////////////////////// 79 ///////////////////////////////////////////////////////////////////////////////
80 80
81 class GradientsNoTextureGM : public GM { 81 class GradientsNoTextureGM : public GM {
82 public: 82 public:
83 GradientsNoTextureGM() { 83 GradientsNoTextureGM() {
84 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); 84 this->setBGColor(0xFFDDDDDD);
85 } 85 }
86 86
87 protected: 87 protected:
88 88
89 SkString onShortName() override { return SkString("gradients_no_texture"); } 89 SkString onShortName() override { return SkString("gradients_no_texture"); }
90 SkISize onISize() override { return SkISize::Make(640, 615); } 90 SkISize onISize() override { return SkISize::Make(640, 615); }
91 91
92 void onDraw(SkCanvas* canvas) override { 92 void onDraw(SkCanvas* canvas) override {
93 static const SkPoint kPts[2] = { { 0, 0 }, 93 static const SkPoint kPts[2] = { { 0, 0 },
94 { SkIntToScalar(50), SkIntToScalar(50) } }; 94 { SkIntToScalar(50), SkIntToScalar(50) } };
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 private: 245 private:
246 typedef GM INHERITED; 246 typedef GM INHERITED;
247 }; 247 };
248 248
249 /////////////////////////////////////////////////////////////////////////////// 249 ///////////////////////////////////////////////////////////////////////////////
250 250
251 DEF_GM( return SkNEW(GradientsNoTextureGM)); 251 DEF_GM( return SkNEW(GradientsNoTextureGM));
252 DEF_GM( return SkNEW(GradientsManyColorsGM)); 252 DEF_GM( return SkNEW(GradientsManyColorsGM));
OLDNEW
« no previous file with comments | « gm/gradients_2pt_conical.cpp ('k') | gm/internal_links.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698