diff options
author | Matt Sarett <msarett@google.com> | 2016-10-16 10:20:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-16 14:51:57 +0000 |
commit | f489886915034093278353d06c6f1973b2e8b7d2 (patch) | |
tree | 284181b7f901cd0ac47ed0e52df17cc64a86fb49 /include | |
parent | 24a865c2c048faa615fcdde3b209a9c10a9be923 (diff) |
Cache dst LUTs in SkColorSpaceXform
This is only useful in the rare case that the dst does not
fall into one of our main paths.
But it's a good optimization, since this does happen,
and typically, the dst won't change.
ColorCodecBench z620 --nonstd --xform_only
Without Patch 511us
With Patch 348us
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3400
Change-Id: Ibf68d9ce7072680465662922f4aa15630545e3d6
Reviewed-on: https://skia-review.googlesource.com/3400
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkColorSpaceXform.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/include/core/SkColorSpaceXform.h b/include/core/SkColorSpaceXform.h index 15b3d49ee4..b1ca92ef55 100644 --- a/include/core/SkColorSpaceXform.h +++ b/include/core/SkColorSpaceXform.h @@ -50,17 +50,11 @@ public: * */ bool apply(ColorFormat dstFormat, void* dst, ColorFormat srcFormat, const void* src, int count, - SkAlphaType alphaType) const { - return this->onApply(dstFormat, dst, srcFormat, src, count, alphaType); - } - + SkAlphaType alphaType) const; virtual ~SkColorSpaceXform() {} protected: - virtual bool onApply(ColorFormat dstFormat, void* dst, ColorFormat srcFormat, const void* src, - int count, SkAlphaType alphaType) const = 0; - SkColorSpaceXform() {} }; |