Index: src/core/SkValidatingReadBuffer.h |
diff --git a/src/core/SkValidatingReadBuffer.h b/src/core/SkValidatingReadBuffer.h |
index c854b0af2c4583ddf5dac61681236bb3fd1794b4..4d1919b62c1cfba7766948f67c6882a2ec0f22f9 100644 |
--- a/src/core/SkValidatingReadBuffer.h |
+++ b/src/core/SkValidatingReadBuffer.h |
@@ -47,24 +47,24 @@ public: |
virtual void readPath(SkPath* path) SK_OVERRIDE; |
// binary data and arrays |
- virtual uint32_t readByteArray(void* value) SK_OVERRIDE; |
- virtual uint32_t readColorArray(SkColor* colors) SK_OVERRIDE; |
- virtual uint32_t readIntArray(int32_t* values) SK_OVERRIDE; |
- virtual uint32_t readPointArray(SkPoint* points) SK_OVERRIDE; |
- virtual uint32_t readScalarArray(SkScalar* values) SK_OVERRIDE; |
+ virtual bool readByteArray(void* value, size_t size) SK_OVERRIDE; |
+ virtual bool readColorArray(SkColor* colors, size_t size) SK_OVERRIDE; |
+ virtual bool readIntArray(int32_t* values, size_t size) SK_OVERRIDE; |
+ virtual bool readPointArray(SkPoint* points, size_t size) SK_OVERRIDE; |
+ virtual bool readScalarArray(SkScalar* values, size_t size) SK_OVERRIDE; |
// helpers to get info about arrays and binary data |
virtual uint32_t getArrayCount() SK_OVERRIDE; |
virtual void readBitmap(SkBitmap* bitmap) SK_OVERRIDE; |
// TODO: Implement this (securely) when needed |
- virtual SkTypeface* readTypeface() SK_OVERRIDE { return NULL; } |
+ virtual SkTypeface* readTypeface() SK_OVERRIDE; |
- virtual void validate(bool isValid) SK_OVERRIDE { |
- fError = fError || !isValid; |
- } |
+ virtual void validate(bool isValid) SK_OVERRIDE; |
private: |
+ bool readArray(void* value, size_t size, size_t elementSize); |
+ |
void setMemory(const void* data, size_t size); |
static bool IsPtrAlign4(const void* ptr) { |