summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/src/core/SkDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/src/core/SkDebug.cpp')
-rw-r--r--chromium/third_party/skia/src/core/SkDebug.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/chromium/third_party/skia/src/core/SkDebug.cpp b/chromium/third_party/skia/src/core/SkDebug.cpp
index 2a04b302ff6..b705a650ea2 100644
--- a/chromium/third_party/skia/src/core/SkDebug.cpp
+++ b/chromium/third_party/skia/src/core/SkDebug.cpp
@@ -41,4 +41,19 @@ uint32_t SkToU32(uintmax_t x) {
return (uint32_t)x;
}
+int SkToInt(intmax_t x) {
+ SkASSERT((int)x == x);
+ return (int)x;
+}
+
+unsigned SkToUInt(uintmax_t x) {
+ SkASSERT((unsigned)x == x);
+ return (unsigned)x;
+}
+
+size_t SkToSizeT(uintmax_t x) {
+ SkASSERT((size_t)x == x);
+ return (size_t)x;
+}
+
#endif