diff options
author | Herb Derby <herb@google.com> | 2019-04-17 18:01:04 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2019-06-04 14:11:45 +0000 |
commit | baf64786ba1b0cbc1b38511abcfff0fd11d23159 (patch) | |
tree | 9552886b82147dd24436242ccd97dd3addaba691 /bench/PathTextBench.cpp | |
parent | 048413400a985a8954340c5a29d6c1c4257fb1e6 (diff) | |
download | skia-baf64786ba1b0cbc1b38511abcfff0fd11d23159.tar.gz |
Convert over more sites to SkStrikeSpecStorage, and remove unused calls
Convert over remaining callsights for strike lookup, and reduce the SkStrikeCache
API.
- one friend decl.
Change-Id: I109a747061030f26ff908472ea55a4424d5c10f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209109
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'bench/PathTextBench.cpp')
-rw-r--r-- | bench/PathTextBench.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bench/PathTextBench.cpp b/bench/PathTextBench.cpp index ed4468a246..6c914858e9 100644 --- a/bench/PathTextBench.cpp +++ b/bench/PathTextBench.cpp @@ -12,6 +12,7 @@ #include "include/utils/SkRandom.h" #include "src/core/SkStrike.h" #include "src/core/SkStrikeCache.h" +#include "src/core/SkStrikeSpec.h" #include "tools/ToolUtils.h" static constexpr int kScreenWidth = 1500; @@ -46,7 +47,8 @@ private: void onDelayedSetup() override { SkFont defaultFont; - auto cache = SkStrikeCache::FindOrCreateStrikeWithNoDeviceExclusive(defaultFont); + SkStrikeSpecStorage strikeSpec = SkStrikeSpecStorage::MakeCanonicalized(defaultFont); + auto cache = strikeSpec.findOrCreateExclusiveStrike(); for (int i = 0; i < kNumGlyphs; ++i) { SkPackedGlyphID id(defaultFont.unicharToGlyph(kGlyphs[i])); sk_ignore_unused_variable(cache->getScalerContext()->getPath(id, &fGlyphs[i])); |