aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkMatrix.cpp')
-rw-r--r--src/core/SkMatrix.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index cd7bcea176..5bcb35b298 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -1921,25 +1921,20 @@ const SkMatrix& SkMatrix::InvalidMatrix() {
///////////////////////////////////////////////////////////////////////////////
-size_t SkMatrix::writeToMemory(void* buffer) const {
+uint32_t SkMatrix::writeToMemory(void* buffer) const {
// TODO write less for simple matrices
- static const size_t sizeInMemory = 9 * sizeof(SkScalar);
if (buffer) {
- memcpy(buffer, fMat, sizeInMemory);
+ memcpy(buffer, fMat, 9 * sizeof(SkScalar));
}
- return sizeInMemory;
+ return 9 * sizeof(SkScalar);
}
-size_t SkMatrix::readFromMemory(const void* buffer, size_t length) {
- static const size_t sizeInMemory = 9 * sizeof(SkScalar);
- if (length < sizeInMemory) {
- return 0;
- }
+uint32_t SkMatrix::readFromMemory(const void* buffer) {
if (buffer) {
- memcpy(fMat, buffer, sizeInMemory);
+ memcpy(fMat, buffer, 9 * sizeof(SkScalar));
this->setTypeMask(kUnknown_Mask);
}
- return sizeInMemory;
+ return 9 * sizeof(SkScalar);
}
#ifdef SK_DEVELOPER