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

Side by Side Diff: include/device/xps/SkConstexprMath.h

Issue 14873006: XPS ttc handling. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix clang error about typename and dependent type. Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkTemplates.h ('k') | include/device/xps/SkXPSDevice.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 * 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 #ifndef SkConstexprMath_DEFINED 8 #ifndef SkConstexprMath_DEFINED
9 #define SkConstexprMath_DEFINED 9 #define SkConstexprMath_DEFINED
10 10
(...skipping 28 matching lines...) Expand all
39 if the bits of type t are considered as unsigned base two. 39 if the bits of type t are considered as unsigned base two.
40 */ 40 */
41 #define SK_BASE_N_DIGITS_IN(n, t) (\ 41 #define SK_BASE_N_DIGITS_IN(n, t) (\
42 SK_LOG<SK_2N1<(sizeof(t) * CHAR_BIT)>::value, n>::value\ 42 SK_LOG<SK_2N1<(sizeof(t) * CHAR_BIT)>::value, n>::value\
43 ) 43 )
44 /** Compile-time constant number of base 10 digits in type t 44 /** Compile-time constant number of base 10 digits in type t
45 if the bits of type t are considered as unsigned base two. 45 if the bits of type t are considered as unsigned base two.
46 */ 46 */
47 #define SK_DIGITS_IN(t) SK_BASE_N_DIGITS_IN(10, (t)) 47 #define SK_DIGITS_IN(t) SK_BASE_N_DIGITS_IN(10, (t))
48 48
49 //! a > b ? a : b 49 // Compile-time constant maximum value of two unsigned values.
50 #define SK_MAX(a,b) (((a) > (b)) ? (a) : (b)) 50 template <uintmax_t a, uintmax_t b> struct SkTUMax {
51 static const uintmax_t value = (b < a) ? a : b;
52 };
51 53
52 #endif 54 #endif
OLDNEW
« no previous file with comments | « include/core/SkTemplates.h ('k') | include/device/xps/SkXPSDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698