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

Side by Side Diff: gm/nested.cpp

Issue 1176243006: make gm background colors 565 compatible (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: revert bitmap test changes -- only need to change font 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/modecolorfilters.cpp ('k') | gm/pathinterior.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 "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkRRect.h" 10 #include "SkRRect.h"
11 11
12 namespace skiagm { 12 namespace skiagm {
13 13
14 // Test out various combinations of nested rects, ovals and rrects. 14 // Test out various combinations of nested rects, ovals and rrects.
15 class NestedGM : public GM { 15 class NestedGM : public GM {
16 public: 16 public:
17 NestedGM(bool doAA, bool flipped) : fDoAA(doAA), fFlipped(flipped) { 17 NestedGM(bool doAA, bool flipped) : fDoAA(doAA), fFlipped(flipped) {
18 this->setBGColor(0xFFDDDDDD); 18 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
19 } 19 }
20 20
21 protected: 21 protected:
22 22
23 SkString onShortName() override { 23 SkString onShortName() override {
24 SkString name("nested"); 24 SkString name("nested");
25 if (fFlipped) { 25 if (fFlipped) {
26 name.append("_flipY"); 26 name.append("_flipY");
27 } 27 }
28 if (fDoAA) { 28 if (fDoAA) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 }; 132 };
133 133
134 /////////////////////////////////////////////////////////////////////////////// 134 ///////////////////////////////////////////////////////////////////////////////
135 135
136 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ false); ) 136 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ false); )
137 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ false); ) 137 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ false); )
138 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ true); ) 138 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ true); )
139 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ true); ) 139 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ true); )
140 140
141 } 141 }
OLDNEW
« no previous file with comments | « gm/modecolorfilters.cpp ('k') | gm/pathinterior.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698