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

Side by Side Diff: gm/bigblurs.cpp

Issue 1182403003: Revert of 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/arcofzorro.cpp ('k') | gm/bigmatrix.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 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
11 #include "SkBlurMaskFilter.h" 11 #include "SkBlurMaskFilter.h"
12 12
13 namespace skiagm { 13 namespace skiagm {
14 14
15 // This GM exercises the blurred rect nine-patching special cases when the 15 // This GM exercises the blurred rect nine-patching special cases when the
16 // blurred rect is very large and/or very far from the origin. 16 // blurred rect is very large and/or very far from the origin.
17 // It creates a large blurred rect/rectori then renders the 4 corners and the 17 // It creates a large blurred rect/rectori then renders the 4 corners and the
18 // middle. 18 // middle.
19 class BigBlursGM : public GM { 19 class BigBlursGM : public GM {
20 public: 20 public:
21 BigBlursGM() { 21 BigBlursGM() {
22 this->setBGColor(0xFFDDDDDD); 22 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
23 } 23 }
24 24
25 protected: 25 protected:
26 SkString onShortName() override { 26 SkString onShortName() override {
27 return SkString("bigblurs"); 27 return SkString("bigblurs");
28 } 28 }
29 29
30 SkISize onISize() override { 30 SkISize onISize() override {
31 return SkISize::Make(kWidth, kHeight); 31 return SkISize::Make(kWidth, kHeight);
32 } 32 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 static const int kCloseUpSize = 64; 107 static const int kCloseUpSize = 64;
108 static const int kWidth = 5 * kCloseUpSize; 108 static const int kWidth = 5 * kCloseUpSize;
109 static const int kHeight = 2 * (kLastEnum_SkBlurStyle + 1) * kCloseUpSize; 109 static const int kHeight = 2 * (kLastEnum_SkBlurStyle + 1) * kCloseUpSize;
110 110
111 typedef GM INHERITED; 111 typedef GM INHERITED;
112 }; 112 };
113 113
114 DEF_GM( return SkNEW(BigBlursGM); ) 114 DEF_GM( return SkNEW(BigBlursGM); )
115 115
116 } 116 }
OLDNEW
« no previous file with comments | « gm/arcofzorro.cpp ('k') | gm/bigmatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698