const SkDescriptor::flatten

Change-Id: I4a37da74f9fc351cf62e9c028c38ac1f3f8c963a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506883
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Herb Derby 2022-02-10 13:25:10 -05:00 committed by SkCQ
parent db4a543e45
commit b6dfd97c52
2 changed files with 3 additions and 3 deletions

View File

@ -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<void*>(this), this->fLength);
void SkDescriptor::flatten(SkWriteBuffer& buffer) const {
buffer.writePad32(static_cast<const void*>(this), this->fLength);
}
void* SkDescriptor::addEntry(uint32_t tag, size_t length, const void* data) {

View File

@ -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);