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

Side by Side Diff: gm/pathinterior.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/nested.cpp ('k') | gm/rrects.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 2012 Google Inc. 2 * Copyright 2012 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 "SkGraphics.h" 10 #include "SkGraphics.h"
11 #include "SkRandom.h" 11 #include "SkRandom.h"
12 #include "SkLayerDrawLooper.h" 12 #include "SkLayerDrawLooper.h"
13 #include "SkBlurMaskFilter.h" 13 #include "SkBlurMaskFilter.h"
14 14
15 static SkRect inset(const SkRect& r) { 15 static SkRect inset(const SkRect& r) {
16 SkRect rect = r; 16 SkRect rect = r;
17 rect.inset(r.width() / 8, r.height() / 8); 17 rect.inset(r.width() / 8, r.height() / 8);
18 return rect; 18 return rect;
19 } 19 }
20 20
21 class PathInteriorGM : public skiagm::GM { 21 class PathInteriorGM : public skiagm::GM {
22 public: 22 public:
23 PathInteriorGM() { 23 PathInteriorGM() {
24 this->setBGColor(0xFFDDDDDD); 24 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
25 } 25 }
26 26
27 protected: 27 protected:
28 SkISize onISize() override { 28 SkISize onISize() override {
29 return SkISize::Make(770, 770); 29 return SkISize::Make(770, 770);
30 } 30 }
31 31
32 SkString onShortName() override { 32 SkString onShortName() override {
33 return SkString("pathinterior"); 33 return SkString("pathinterior");
34 } 34 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 private: 105 private:
106 106
107 typedef GM INHERITED; 107 typedef GM INHERITED;
108 }; 108 };
109 109
110 ////////////////////////////////////////////////////////////////////////////// 110 //////////////////////////////////////////////////////////////////////////////
111 111
112 static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; } 112 static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; }
113 static skiagm::GMRegistry reg(MyFactory); 113 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/nested.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698