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

Side by Side Diff: gm/blurs.cpp

Issue 2300623005: Replace a lot of 'static const' with 'constexpr' or 'const'. (Closed)
Patch Set: small msvc concession Created 4 years, 3 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/blurredclippedcircle.cpp ('k') | gm/bmpfilterqualityrepeat.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
11 #include "SkPath.h" 11 #include "SkPath.h"
12 12
13 DEF_SIMPLE_GM_BG(blurs, canvas, 700, 500, sk_tool_utils::color_to_565(0xFFDDDDDD )) { 13 DEF_SIMPLE_GM_BG(blurs, canvas, 700, 500, sk_tool_utils::color_to_565(0xFFDDDDDD )) {
14 SkBlurStyle NONE = SkBlurStyle(-999); 14 SkBlurStyle NONE = SkBlurStyle(-999);
15 static const struct { 15 const struct {
16 SkBlurStyle fStyle; 16 SkBlurStyle fStyle;
17 int fCx, fCy; 17 int fCx, fCy;
18 } gRecs[] = { 18 } gRecs[] = {
19 { NONE, 0, 0 }, 19 { NONE, 0, 0 },
20 { kInner_SkBlurStyle, -1, 0 }, 20 { kInner_SkBlurStyle, -1, 0 },
21 { kNormal_SkBlurStyle, 0, 1 }, 21 { kNormal_SkBlurStyle, 0, 1 },
22 { kSolid_SkBlurStyle, 0, -1 }, 22 { kSolid_SkBlurStyle, 0, -1 },
23 { kOuter_SkBlurStyle, 1, 0 }, 23 { kOuter_SkBlurStyle, 1, 0 },
24 }; 24 };
25 25
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 SkScalar dx = SkScalarRoundToScalar(path.getBounds().width()) + 40 + 0.2 5f; 110 SkScalar dx = SkScalarRoundToScalar(path.getBounds().width()) + 40 + 0.2 5f;
111 canvas->translate(dx, 0); 111 canvas->translate(dx, 0);
112 canvas->drawPath(path, paint); 112 canvas->drawPath(path, paint);
113 113
114 // Translate to outside of clip bounds. 114 // Translate to outside of clip bounds.
115 canvas->translate(-dx, 0); 115 canvas->translate(-dx, 0);
116 canvas->translate(-30, -150); 116 canvas->translate(-30, -150);
117 canvas->drawPath(path, paint); 117 canvas->drawPath(path, paint);
118 } 118 }
OLDNEW
« no previous file with comments | « gm/blurredclippedcircle.cpp ('k') | gm/bmpfilterqualityrepeat.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698