XPS ttc handling.

R=reed@google.com

Author: bungeman@google.com

Review URL: https://chromiumcodereview.appspot.com/14873006

git-svn-id: http://skia.googlecode.com/svn/trunk@9037 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/device/xps/SkConstexprMath.h b/include/device/xps/SkConstexprMath.h
index 65b70b6..9625d51 100644
--- a/include/device/xps/SkConstexprMath.h
+++ b/include/device/xps/SkConstexprMath.h
@@ -46,7 +46,9 @@
 */
 #define SK_DIGITS_IN(t) SK_BASE_N_DIGITS_IN(10, (t))
 
-//! a > b ? a : b
-#define SK_MAX(a,b) (((a) > (b)) ? (a) : (b))
+// Compile-time constant maximum value of two unsigned values.
+template <uintmax_t a, uintmax_t b> struct SkTUMax {
+    static const uintmax_t value = (b < a) ? a : b;
+};
 
 #endif