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

Side by Side Diff: src/core/SkTextFormatParams.h

Issue 1306443004: Use static_assert instead of SK_COMPILE_ASSERT. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « src/core/SkTextBlob.cpp ('k') | src/core/SkVarAlloc.h » ('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 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
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 9
10 #ifndef SkTextFormatParams_DEFINES 10 #ifndef SkTextFormatParams_DEFINES
(...skipping 12 matching lines...) Expand all
23 // The fraction of text size to embolden fake bold text scales with text size. 23 // The fraction of text size to embolden fake bold text scales with text size.
24 // At 9 points or below, the stroke width is increased by text size / 24. 24 // At 9 points or below, the stroke width is increased by text size / 24.
25 // At 36 points and above, it is increased by text size / 32. In between, 25 // At 36 points and above, it is increased by text size / 32. In between,
26 // it is interpolated between those values. 26 // it is interpolated between those values.
27 static const SkScalar kStdFakeBoldInterpKeys[] = { 27 static const SkScalar kStdFakeBoldInterpKeys[] = {
28 SK_Scalar1*9, 28 SK_Scalar1*9,
29 SK_Scalar1*36, 29 SK_Scalar1*36,
30 }; 30 };
31 static const SkScalar kStdFakeBoldInterpValues[] = { 31 static const SkScalar kStdFakeBoldInterpValues[] = {
32 SK_Scalar1/24, 32 SK_Scalar1/24,
33 SK_Scalar1/32 33 SK_Scalar1/32,
34 }; 34 };
35 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(kStdFakeBoldInterpKeys) == 35 static_assert(SK_ARRAY_COUNT(kStdFakeBoldInterpKeys) == SK_ARRAY_COUNT(kStdFakeB oldInterpValues),
36 SK_ARRAY_COUNT(kStdFakeBoldInterpValues), 36 "mismatched_array_size");
37 mismatched_array_size); 37 static const int kStdFakeBoldInterpLength = SK_ARRAY_COUNT(kStdFakeBoldInterpKey s);
38 static const int kStdFakeBoldInterpLength =
39 SK_ARRAY_COUNT(kStdFakeBoldInterpKeys);
40 38
41 #endif //SkTextFormatParams_DEFINES 39 #endif //SkTextFormatParams_DEFINES
OLDNEW
« no previous file with comments | « src/core/SkTextBlob.cpp ('k') | src/core/SkVarAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698