diff options
author | Vladimir Levin <vmpstr@chromium.org> | 2018-01-18 12:35:11 -0800 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-19 21:17:56 +0000 |
commit | ad6660a639aba236c9d30485da1cd2bb1292ef83 (patch) | |
tree | 623609cd34aad6aa66e865fc58871a21b6d8be8b /include/core | |
parent | 16d0ad06b46841c78cce816406574314fab95c13 (diff) |
Use equal_range for factory lookups
This patch uses equal_range instead of linear search to look up a
factory entry by name. This does require a sort, but the expected usage
is that the sort happens once and look ups happen many times.
This improves performance on Chromium's oop deserialization of
flattenables by about 10%
R=reed@chromium.org
Change-Id: I907f457a2ffb7d5b6d8261343099d982260b8415
Reviewed-on: https://skia-review.googlesource.com/96820
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkFlattenable.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h index eaaf9c3d92..cfeda8fe6c 100644 --- a/include/core/SkFlattenable.h +++ b/include/core/SkFlattenable.h @@ -147,6 +147,7 @@ protected: private: static void InitializeFlattenablesIfNeeded(); + static void Finalize(); friend class SkGraphics; |