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

Unified Diff: include/core/SkTypes.h

Issue 187653003: Add size_t bytesWritten() const to SkWStream. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add and use SkToSizeT Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: include/core/SkTypes.h
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 969aac77b66e2c9db9f82739634588fdcb9f5fa0..ab43767c6d034478725cfbb3df8a375b4c66e946 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -219,6 +219,7 @@ typedef uint8_t SkBool8;
SK_API uint32_t SkToU32(uintmax_t);
SK_API int SkToInt(intmax_t);
SK_API unsigned SkToUInt(uintmax_t);
+ SK_API size_t SkToSizeT(uintmax_t);
#else
#define SkToS8(x) ((int8_t)(x))
#define SkToU8(x) ((uint8_t)(x))
@@ -228,6 +229,7 @@ typedef uint8_t SkBool8;
#define SkToU32(x) ((uint32_t)(x))
#define SkToInt(x) ((int)(x))
#define SkToUInt(x) ((unsigned)(x))
+ #define SkToSizeT(x) ((size_t)(x))
#endif
/** Returns 0 or 1 based on the condition
« no previous file with comments | « include/core/SkStream.h ('k') | src/core/SkDebug.cpp » ('j') | src/core/SkStream.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698