Cleanup findOrCreateScopedStrike

This does not need to repeat the code of the version that returns a Node*.

Change-Id: I3c67e3848ba4772cc63b71b78ad29f93fd479956
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221722
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
Herb Derby 2019-06-18 16:08:25 -04:00 committed by Skia Commit-Bot
parent edc42b9971
commit d42692d329

View File

@ -172,12 +172,7 @@ auto SkStrikeCache::findOrCreateStrike(const SkDescriptor& desc,
SkScopedStrike SkStrikeCache::findOrCreateScopedStrike(const SkDescriptor& desc,
const SkScalerContextEffects& effects,
const SkTypeface& typeface) {
Node* node = this->findAndDetachStrike(desc);
if (node == nullptr) {
auto scaler = CreateScalerContext(desc, effects, typeface);
node = this->createStrike(desc, std::move(scaler));
}
return SkScopedStrike{node};
return SkScopedStrike{this->findOrCreateStrike(desc, effects, typeface)};
}
void SkStrikeCache::PurgeAll() {