aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkModeColorFilter.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-11-04 16:36:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-04 21:11:01 +0000
commitc5093411071222c752334dc6e38887020e986cc3 (patch)
treecf8883533b865cc3182bc970efdb50a361615d79 /src/core/SkModeColorFilter.cpp
parente33998aa26b27861463ec526f9c5dbb13607973b (diff)
swap_src_dst -> move_src_dst
We thought it'd be handy to have swap_src_dst so that it could be used either to move dst into src or src into dst. Turns out, we already have a stage that moves dst into src (called "dst", the dst blend mode), so there's really no reason to have swap_src_dst over the strictly more efficient move_src_dst. swap_src_dst is typically 12 register moves, where move_src_dst is 4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4461 Change-Id: Ib453775f854e313f823851978eaadc3995872312 Reviewed-on: https://skia-review.googlesource.com/4461 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkModeColorFilter.cpp')
-rw-r--r--src/core/SkModeColorFilter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkModeColorFilter.cpp b/src/core/SkModeColorFilter.cpp
index 176c92b461..b9ad76f390 100644
--- a/src/core/SkModeColorFilter.cpp
+++ b/src/core/SkModeColorFilter.cpp
@@ -88,7 +88,7 @@ sk_sp<SkFlattenable> SkModeColorFilter::CreateProc(SkReadBuffer& buffer) {
bool SkModeColorFilter::onAppendStages(SkRasterPipeline* p, bool shaderIsOpaque) const {
// TODO: For some modes we can cut a stage by loading the fPM4f into dr,dg,db,da
// and applying the opposite xfermode, e.g. dst-in instead of src-in.
- p->append(SkRasterPipeline::swap_src_dst);
+ p->append(SkRasterPipeline::move_src_dst);
p->append(SkRasterPipeline::constant_color, &fPM4f);
auto mode = (SkBlendMode)fMode;
if (!SkBlendMode_AppendStages(mode, p)) {