diff options
author | 2016-11-04 16:36:39 -0400 | |
---|---|---|
committer | 2016-11-04 21:11:01 +0000 | |
commit | c5093411071222c752334dc6e38887020e986cc3 (patch) | |
tree | cf8883533b865cc3182bc970efdb50a361615d79 /src/core | |
parent | e33998aa26b27861463ec526f9c5dbb13607973b (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')
-rw-r--r-- | src/core/SkModeColorFilter.cpp | 2 | ||||
-rw-r--r-- | src/core/SkRasterPipeline.h | 2 |
2 files changed, 2 insertions, 2 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)) { diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h index bf886cf43c..9193de5202 100644 --- a/src/core/SkRasterPipeline.h +++ b/src/core/SkRasterPipeline.h @@ -55,7 +55,7 @@ // the Stage*. This mostly matters on 64-bit Windows where every register is precious. #define SK_RASTER_PIPELINE_STAGES(M) \ - M(swap_src_dst) M(clamp_0) M(clamp_a) M(unpremul) M(premul) \ + M(move_src_dst) M(clamp_0) M(clamp_a) M(unpremul) M(premul) \ M(constant_color) M(store_f32) \ M(load_s_565) M(load_d_565) M(store_565) \ M(load_s_srgb) M(load_d_srgb) M(store_srgb) \ |