aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-03-27 15:07:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-28 16:07:04 +0000
commitd2adc66efec8a172b71bf5572fbedde064025825 (patch)
tree12a61a477bfc82b769912951e920eb787a42eb60 /src/image
parent20ece3a966708bf2886034cda15aea7f4946f4b1 (diff)
Use SkTransferFunctionBehavior for raster pixel conversions
Fixes some gbr-8888 behaviors. BUG=skia: Change-Id: I1351b043129f7ed0e125bfdb626a0ecaf64c15cc Reviewed-on: https://skia-review.googlesource.com/10169 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage_Raster.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 30262ddbc3..547bdbf5ad 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -374,7 +374,9 @@ sk_sp<SkImage> SkImage_Raster::onMakeColorSpace(sk_sp<SkColorSpace> target) cons
src.setColorSpace(SkColorSpace::MakeSRGB());
}
- SkAssertResult(dst.writePixels(src));
+ // Use kIgnore for transfer function behavior. This is used by the SkColorSpaceXformCanvas,
+ // which wants to pre-xform the inputs but ignore the transfer function on blends.
+ SkAssertResult(dst.writePixels(src, 0, 0, SkTransferFunctionBehavior::kIgnore));
dst.setImmutable();
return SkImage::MakeFromBitmap(dst);
}