diff options
author | msarett <msarett@google.com> | 2016-04-05 09:32:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 09:32:35 -0700 |
commit | 6b63536e917d86028630199c4eef4aa1597292ce (patch) | |
tree | 8866e91676890363bd9a3a22e0963eecd31a4169 /src/core | |
parent | fc11b0afe0ca922a42767d4a656ed640008da1bb (diff) |
Delete SkFlattenable::Type (part 1)
This should allow me to delete uses of SkFlattenable::Type in Chrome.
Then I'll follow up with the full delete.
https://codereview.chromium.org/1834303003/
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861013002
Review URL: https://codereview.chromium.org/1861013002
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkValidatingReadBuffer.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp index ad4b6c409e..c80192f8b2 100644 --- a/src/core/SkValidatingReadBuffer.cpp +++ b/src/core/SkValidatingReadBuffer.cpp @@ -222,20 +222,14 @@ bool SkValidatingReadBuffer::validateAvailable(size_t size) { return this->validate((size <= SK_MaxU32) && fReader.isAvailable(static_cast<uint32_t>(size))); } -SkFlattenable* SkValidatingReadBuffer::readFlattenable(SkFlattenable::Type type) { +SkFlattenable* SkValidatingReadBuffer::readFlattenable(SkFlattenable::Type) { SkString name; this->readString(&name); if (fError) { return nullptr; } - // Is this the type we wanted ? const char* cname = name.c_str(); - SkFlattenable::Type baseType; - if (!SkFlattenable::NameToType(cname, &baseType) || (baseType != type)) { - return nullptr; - } - SkFlattenable::Factory factory = SkFlattenable::NameToFactory(cname); if (nullptr == factory) { return nullptr; // writer failed to give us the flattenable |