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

Side by Side Diff: gm/texturedomaineffect.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/texteffects.cpp ('k') | gm/thinrects.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 2014 Google Inc. 2 * Copyright 2014 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 // This test only works with the GPU backend. 8 // This test only works with the GPU backend.
9 9
10 #include "gm.h" 10 #include "gm.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 renderRect, null ptr, nullptr)); 131 renderRect, null ptr, nullptr));
132 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint , batch); 132 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint , batch);
133 x += renderRect.width() + kTestPad; 133 x += renderRect.width() + kTestPad;
134 } 134 }
135 y += renderRect.height() + kTestPad; 135 y += renderRect.height() + kTestPad;
136 } 136 }
137 } 137 }
138 } 138 }
139 139
140 private: 140 private:
141 static const SkScalar kDrawPad; 141 static constexpr SkScalar kDrawPad = 10.f;
142 static const SkScalar kTestPad; 142 static constexpr SkScalar kTestPad = 10.f;;
143 static const int kTargetWidth = 100; 143 static constexpr int kTargetWidth = 100;
144 static const int kTargetHeight = 100; 144 static constexpr int kTargetHeight = 100;
145 SkBitmap fBmp; 145 SkBitmap fBmp;
146 146
147 typedef GM INHERITED; 147 typedef GM INHERITED;
148 }; 148 };
149 149
150 // Windows builds did not like SkScalar initialization in class :(
151 const SkScalar TextureDomainEffect::kDrawPad = 10.f;
152 const SkScalar TextureDomainEffect::kTestPad = 10.f;
153
154 DEF_GM(return new TextureDomainEffect;) 150 DEF_GM(return new TextureDomainEffect;)
155 } 151 }
156 152
157 #endif 153 #endif
OLDNEW
« no previous file with comments | « gm/texteffects.cpp ('k') | gm/thinrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698