Use non-linear blending flag in raster pipeline blitter
BUG=skia:
Change-Id: I00b52e6de3b46b7d26c1df2aa63c521b6c7ece2d
Reviewed-on: https://skia-review.googlesource.com/8526
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp
index 273f5fe..a994de3 100644
--- a/src/core/SkRasterPipelineBlitter.cpp
+++ b/src/core/SkRasterPipelineBlitter.cpp
@@ -21,7 +21,7 @@
class SkRasterPipelineBlitter : public SkBlitter {
public:
static SkBlitter* Create(const SkPixmap&, const SkPaint&, const SkMatrix& ctm,
- SkArenaAlloc*, bool blendCorrectly);
+ SkArenaAlloc*);
SkRasterPipelineBlitter(SkPixmap dst, SkBlendMode blend, SkPM4f paintColor, bool blendCorrectly)
: fDst(dst)
@@ -69,9 +69,8 @@
SkBlitter* SkCreateRasterPipelineBlitter(const SkPixmap& dst,
const SkPaint& paint,
const SkMatrix& ctm,
- SkArenaAlloc* alloc,
- bool blendCorrectly) {
- return SkRasterPipelineBlitter::Create(dst, paint, ctm, alloc, blendCorrectly);
+ SkArenaAlloc* alloc) {
+ return SkRasterPipelineBlitter::Create(dst, paint, ctm, alloc);
}
static bool supported(const SkImageInfo& info) {
@@ -87,8 +86,8 @@
SkBlitter* SkRasterPipelineBlitter::Create(const SkPixmap& dst,
const SkPaint& paint,
const SkMatrix& ctm,
- SkArenaAlloc* alloc,
- bool blendCorrectly) {
+ SkArenaAlloc* alloc) {
+ bool blendCorrectly = !(dst.colorSpace() && as_CSB(dst.colorSpace())->nonLinearBlending());
auto blitter = alloc->make<SkRasterPipelineBlitter>(
dst,
paint.getBlendMode(),