add srcover_rgba_8888
Change-Id: Iabdc79183ccd2f9cc513d4bdc530fb078b1627ab
Reviewed-on: https://skia-review.googlesource.com/17930
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp
index cc48df0..a9e0e71 100644
--- a/src/core/SkRasterPipelineBlitter.cpp
+++ b/src/core/SkRasterPipelineBlitter.cpp
@@ -317,12 +317,19 @@
if (!fBlitH) {
SkRasterPipeline p(fAlloc);
p.extend(fColorPipeline);
- if (fBlend != SkBlendMode::kSrc) {
- this->append_load_d(&p);
- this->append_blend(&p);
- this->maybe_clamp(&p);
+ if (fBlend == SkBlendMode::kSrcOver
+ && fDst.info().colorType() == kRGBA_8888_SkColorType
+ && !fDst.colorSpace()
+ && fDitherCtx.rate == 0.0f) {
+ p.append(SkRasterPipeline::srcover_rgba_8888, &fDstPtr);
+ } else {
+ if (fBlend != SkBlendMode::kSrc) {
+ this->append_load_d(&p);
+ this->append_blend(&p);
+ this->maybe_clamp(&p);
+ }
+ this->append_store(&p);
}
- this->append_store(&p);
fBlitH = p.compile();
}
this->maybe_shade(x,y,w);