did you mean to leave this in?
Change-Id: I95e7eca71ee5d9ec1cf0d0136b560cd45cee910d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250685 Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com> Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com>
This commit is contained in:
parent
5a8f3e4aac
commit
da5581f860
@ -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<const char*>(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); }
|
||||
|
Loading…
Reference in New Issue
Block a user