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

Side by Side Diff: gm/lightingshader2.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/lightingshader.cpp ('k') | gm/linepaths.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 2016 Google Inc. 2 * Copyright 2016 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 "SkLightingShader.h" 9 #include "SkLightingShader.h"
10 #include "SkNormalSource.h" 10 #include "SkNormalSource.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 canvas->save(); 247 canvas->save();
248 canvas->translate(xPos, yPos); 248 canvas->translate(xPos, yPos);
249 this->drawRect(canvas, 1.0f, 1.0f, 0.0f, true, true, false, false, f LightsTwoDir); 249 this->drawRect(canvas, 1.0f, 1.0f, 0.0f, true, true, false, false, f LightsTwoDir);
250 canvas->restore(); 250 canvas->restore();
251 251
252 gridNum++; 252 gridNum++;
253 } 253 }
254 } 254 }
255 255
256 private: 256 private:
257 static const int kTexSize = 96; 257 static constexpr int kTexSize = 96;
258 258
259 sk_sp<SkShader> fOpaqueDiffuse; 259 sk_sp<SkShader> fOpaqueDiffuse;
260 sk_sp<SkShader> fTranslucentDiffuse; 260 sk_sp<SkShader> fTranslucentDiffuse;
261 sk_sp<SkShader> fNormalMapShader; 261 sk_sp<SkShader> fNormalMapShader;
262 262
263 SkRect fRect; 263 SkRect fRect;
264 sk_sp<SkLights> fLights; 264 sk_sp<SkLights> fLights;
265 sk_sp<SkLights> fLightsNoDir; 265 sk_sp<SkLights> fLightsNoDir;
266 sk_sp<SkLights> fLightsTwoDir; 266 sk_sp<SkLights> fLightsTwoDir;
267 267
268 typedef GM INHERITED; 268 typedef GM INHERITED;
269 }; 269 };
270 270
271 ////////////////////////////////////////////////////////////////////////////// 271 //////////////////////////////////////////////////////////////////////////////
272 272
273 DEF_GM(return new LightingShader2GM;) 273 DEF_GM(return new LightingShader2GM;)
274 } 274 }
OLDNEW
« no previous file with comments | « gm/lightingshader.cpp ('k') | gm/linepaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698