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

Side by Side Diff: gm/bigtileimagefilter.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/bigrrectaaeffect.cpp ('k') | gm/bitmapcopy.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 2015 Google Inc. 2 * Copyright 2015 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 "SkImageSource.h" 8 #include "SkImageSource.h"
9 #include "SkSurface.h" 9 #include "SkSurface.h"
10 #include "SkTileImageFilter.h" 10 #include "SkTileImageFilter.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 SkRect bound3 = SkRect::MakeXYWH(320, 320, 87 SkRect bound3 = SkRect::MakeXYWH(320, 320,
88 SkIntToScalar(kBitmapSize), 88 SkIntToScalar(kBitmapSize),
89 SkIntToScalar(kBitmapSize)); 89 SkIntToScalar(kBitmapSize));
90 canvas->drawImageRect(fGreenImage.get(), bound2, bound3, nullptr, 90 canvas->drawImageRect(fGreenImage.get(), bound2, bound3, nullptr,
91 SkCanvas::kStrict_SrcRectConstraint); 91 SkCanvas::kStrict_SrcRectConstraint);
92 canvas->restore(); 92 canvas->restore();
93 } 93 }
94 } 94 }
95 95
96 private: 96 private:
97 static const int kWidth = 512; 97 static constexpr int kWidth = 512;
98 static const int kHeight = 512; 98 static constexpr int kHeight = 512;
99 static const int kBitmapSize = 64; 99 static constexpr int kBitmapSize = 64;
100 100
101 sk_sp<SkImage> fRedImage; 101 sk_sp<SkImage> fRedImage;
102 sk_sp<SkImage> fGreenImage; 102 sk_sp<SkImage> fGreenImage;
103 103
104 typedef GM INHERITED; 104 typedef GM INHERITED;
105 }; 105 };
106 106
107 ////////////////////////////////////////////////////////////////////////////// 107 //////////////////////////////////////////////////////////////////////////////
108 108
109 DEF_GM(return new BigTileImageFilterGM;) 109 DEF_GM(return new BigTileImageFilterGM;)
110 } 110 }
OLDNEW
« no previous file with comments | « gm/bigrrectaaeffect.cpp ('k') | gm/bitmapcopy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698