diff options
author | Matt Sarett <msarett@google.com> | 2017-03-08 10:22:41 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-08 15:53:03 +0000 |
commit | 3012d187a487ad82c172790bef14c6333fac6e03 (patch) | |
tree | be12bbdc92825830005f7806c67de7a99175cc1c /src/core/SkRasterPipelineBlitter.cpp | |
parent | 3ea01f72f20d4f58bf0dcd420fa5c2724b67ac8d (diff) |
Rename not-fBlendCorrectly to fNonLinearBlending
No policy or behavior changes here, just a rename.
BUG=skia:
Change-Id: Ieefa5c5bbd40f25d4fef81f07b50b4057ea732b4
Reviewed-on: https://skia-review.googlesource.com/9406
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkRasterPipelineBlitter.cpp')
-rw-r--r-- | src/core/SkRasterPipelineBlitter.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp index 87a76aa648..fc69bf4c55 100644 --- a/src/core/SkRasterPipelineBlitter.cpp +++ b/src/core/SkRasterPipelineBlitter.cpp @@ -23,11 +23,12 @@ public: static SkBlitter* Create(const SkPixmap&, const SkPaint&, const SkMatrix& ctm, SkArenaAlloc*); - SkRasterPipelineBlitter(SkPixmap dst, SkBlendMode blend, SkPM4f paintColor, bool blendCorrectly) + SkRasterPipelineBlitter(SkPixmap dst, SkBlendMode blend, SkPM4f paintColor, + bool nonLinearBlending) : fDst(dst) , fBlend(blend) , fPaintColor(paintColor) - , fBlendCorrectly(blendCorrectly) + , fNonLinearBlending(nonLinearBlending) {} void blitH (int x, int y, int w) override; @@ -48,7 +49,7 @@ private: SkBlendMode fBlend; SkPM4f fPaintColor; SkRasterPipeline fShader; - bool fBlendCorrectly; + bool fNonLinearBlending; // We may be able to specialize blitH() into a memset. bool fCanMemsetInBlitH = false; @@ -91,12 +92,12 @@ SkBlitter* SkRasterPipelineBlitter::Create(const SkPixmap& dst, const SkPaint& paint, const SkMatrix& ctm, SkArenaAlloc* alloc) { - bool blendCorrectly = !(dst.colorSpace() && as_CSB(dst.colorSpace())->nonLinearBlending()); + bool nonLinearBlending = dst.colorSpace() && as_CSB(dst.colorSpace())->nonLinearBlending(); auto blitter = alloc->make<SkRasterPipelineBlitter>( dst, paint.getBlendMode(), SkPM4f_from_SkColor(paint.getColor(), dst.colorSpace()), - blendCorrectly); + nonLinearBlending); SkBlendMode* blend = &blitter->fBlend; @@ -130,7 +131,7 @@ SkBlitter* SkRasterPipelineBlitter::Create(const SkPixmap& dst, } // Some people want the rest of the pipeline to operate on sRGB encoded color channels... - if (!blendCorrectly && dst.info().gammaCloseToSRGB()) { + if (nonLinearBlending && dst.info().gammaCloseToSRGB()) { pipeline->append(SkRasterPipeline::to_srgb); } @@ -190,7 +191,7 @@ void SkRasterPipelineBlitter::append_load_d(SkRasterPipeline* p) const { } void SkRasterPipelineBlitter::append_store(SkRasterPipeline* p) const { - if (fBlendCorrectly && fDst.info().gammaCloseToSRGB()) { + if (!fNonLinearBlending && fDst.info().gammaCloseToSRGB()) { p->append(SkRasterPipeline::to_srgb); } if (fDst.info().colorType() == kBGRA_8888_SkColorType) { |