diff --git a/src/core/SkDescriptor.cpp b/src/core/SkDescriptor.cpp index 4c64753f75..9ffce8999c 100644 --- a/src/core/SkDescriptor.cpp +++ b/src/core/SkDescriptor.cpp @@ -29,8 +29,8 @@ void* SkDescriptor::operator new(size_t) { SK_ABORT("Descriptors are created with placement new."); } -void SkDescriptor::flatten(SkWriteBuffer& buffer) { - buffer.writePad32(static_cast(this), this->fLength); +void SkDescriptor::flatten(SkWriteBuffer& buffer) const { + buffer.writePad32(static_cast(this), this->fLength); } void* SkDescriptor::addEntry(uint32_t tag, size_t length, const void* data) { diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h index de1b98fc86..9e535afdc2 100644 --- a/src/core/SkDescriptor.h +++ b/src/core/SkDescriptor.h @@ -32,7 +32,7 @@ public: void* operator new(size_t); void* operator new(size_t, void* p) { return p; } - void flatten(SkWriteBuffer& buffer); + void flatten(SkWriteBuffer& buffer) const; uint32_t getLength() const { return fLength; } void* addEntry(uint32_t tag, size_t length, const void* data = nullptr);