From da5581f86018e4533382f44ab3059a0a08f09564 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Thu, 24 Oct 2019 11:53:40 -0500 Subject: [PATCH] did you mean to leave this in? Change-Id: I95e7eca71ee5d9ec1cf0d0136b560cd45cee910d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250685 Commit-Queue: Mike Klein Commit-Queue: Herb Derby Auto-Submit: Mike Klein Reviewed-by: Herb Derby --- src/core/SkDescriptor.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/core/SkDescriptor.cpp b/src/core/SkDescriptor.cpp index 0750c89152..6d6ce3740c 100644 --- a/src/core/SkDescriptor.cpp +++ b/src/core/SkDescriptor.cpp @@ -85,23 +85,6 @@ uint32_t SkDescriptor::ComputeChecksum(const SkDescriptor* desc) { return SkOpts::hash(ptr, len); } -#if 0 -bool SkDescriptor::isValid() const { - uint32_t count = 0; - size_t offset = sizeof(SkDescriptor); - - while (offset < fLength) { - const Entry* entry = (const Entry*)(reinterpret_cast(this) + offset); - // rec tags are always a known size. - if (entry->fTag == kRec_SkDescriptorTag && entry->fLen != sizeof(SkScalerContextRec)) { - return false; - } - offset += sizeof(Entry) + entry->fLen; - count++; - } - return offset <= fLength && count == fCount; -} -#else bool SkDescriptor::isValid() const { uint32_t count = fCount; size_t lengthRemaining = this->fLength; @@ -130,7 +113,7 @@ bool SkDescriptor::isValid() const { } return lengthRemaining == 0 && count == 0; } -#endif + SkAutoDescriptor::SkAutoDescriptor() = default; SkAutoDescriptor::SkAutoDescriptor(size_t size) { this->reset(size); } SkAutoDescriptor::SkAutoDescriptor(const SkDescriptor& desc) { this->reset(desc); }