Index: src/core/SkValidatingReadBuffer.cpp |
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp |
index 1566af948819355cff8846cf0d022f687df8e139..d57e499cc198177dbfd4d364ebdd45df0c08374f 100644 |
--- a/src/core/SkValidatingReadBuffer.cpp |
+++ b/src/core/SkValidatingReadBuffer.cpp |
@@ -110,6 +110,13 @@ void SkValidatingReadBuffer::readString(SkString* string) { |
} |
} |
+void SkValidatingReadBuffer::readColor4f(SkColor4f* color) { |
+ const void* ptr = this->skip(sizeof(SkColor4f)); |
+ if (!fError) { |
+ memcpy(color, ptr, sizeof(SkColor4f)); |
+ } |
+} |
+ |
void SkValidatingReadBuffer::readPoint(SkPoint* point) { |
point->fX = this->readScalar(); |
point->fY = this->readScalar(); |
@@ -197,6 +204,10 @@ bool SkValidatingReadBuffer::readColorArray(SkColor* colors, size_t size) { |
return readArray(colors, size, sizeof(SkColor)); |
} |
+bool SkValidatingReadBuffer::readColor4fArray(SkColor4f* colors, size_t size) { |
+ return readArray(colors, size, sizeof(SkColor4f)); |
+} |
+ |
bool SkValidatingReadBuffer::readIntArray(int32_t* values, size_t size) { |
return readArray(values, size, sizeof(int32_t)); |
} |