Fix premul state in from_srgb in convert_with_pipeline
Without this patch, the pipeline 1. converts to unpremultiplied 2. applies the sRGB transfer assuming the pixel is premultiplied In step 2, we should assume the pixel is unpremultiplied. Bug:738517 Change-Id: Ic11fcf64faa423577ccb1cfc0cfe96feb57db09a Reviewed-on: https://skia-review.googlesource.com/28404 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
0500ebafec
commit
179849efe5
@ -301,7 +301,7 @@ static void convert_with_pipeline(const SkImageInfo& dstInfo, void* dstRow, size
|
||||
|
||||
SkColorSpaceTransferFn srcFn;
|
||||
if (isColorAware && srcInfo.gammaCloseToSRGB()) {
|
||||
pipeline.append_from_srgb(srcInfo.alphaType());
|
||||
pipeline.append_from_srgb(premulState);
|
||||
} else if (isColorAware && !srcInfo.colorSpace()->gammaIsLinear()) {
|
||||
SkAssertResult(srcInfo.colorSpace()->isNumericalTransferFn(&srcFn));
|
||||
pipeline.append(SkRasterPipeline::parametric_r, &srcFn);
|
||||
|
Loading…
Reference in New Issue
Block a user