From 4b7577b042966657c776fd95c67f9363af57945f Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Mon, 29 Jun 2009 16:14:41 +0000 Subject: add unittest for matrix::flatten define constant for max value flatten/unflatten can return (so clients can put the buffer on the stack) git-svn-id: http://skia.googlecode.com/svn/trunk@243 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkMatrix.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/core') diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h index 9dd4fc9c5c..741c349a43 100644 --- a/include/core/SkMatrix.h +++ b/include/core/SkMatrix.h @@ -400,6 +400,10 @@ public: return memcmp(a.fMat, b.fMat, sizeof(a.fMat)) != 0; } + enum { + // flatten/unflatten will never return a value larger than this + kMaxFlattenSize = 9 * sizeof(SkScalar) + sizeof(uint32_t) + }; // return the number of bytes written, whether or not buffer is null uint32_t flatten(void* buffer) const; // return the number of bytes read -- cgit v1.2.3