Commit efa949d2 authored by Reza.Zakerinasab's avatar Reza.Zakerinasab Committed by Commit Bot

Remove drawing on a sRGB surface in ImageBitmap

TBR=junov@chromium.org

Bug: 849847
Change-Id: I827de83f8c51953906718c6e294d6a0c4e89e3c6
Reviewed-on: https://chromium-review.googlesource.com/1087748
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: default avatarMike Klein <mtklein@chromium.org>
Reviewed-by: default avatarMohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564701}
parent cdf090d3
...@@ -925,13 +925,8 @@ void ImageBitmap::RasterizeImageOnBackgroundThread( ...@@ -925,13 +925,8 @@ void ImageBitmap::RasterizeImageOnBackgroundThread(
bool origin_clean, bool origin_clean,
std::unique_ptr<ParsedOptions> parsed_options) { std::unique_ptr<ParsedOptions> parsed_options) {
DCHECK(!IsMainThread()); DCHECK(!IsMainThread());
// TODO (zakerinasab): crbug.com/768844 SkImageInfo info =
// For now only SVG is decoded async so it is fine to assume the color space SkImageInfo::MakeN32Premul(dst_rect.Width(), dst_rect.Height());
// is SRGB. When other sources are decoded async (crbug.com/580202), make sure
// that proper color space is used in SkImageInfo to avoid clipping the gamut
// of the image bitmap source.
SkImageInfo info = SkImageInfo::MakeS32(dst_rect.Width(), dst_rect.Height(),
kPremul_SkAlphaType);
sk_sp<SkSurface> surface = SkSurface::MakeRaster(info); sk_sp<SkSurface> surface = SkSurface::MakeRaster(info);
sk_sp<SkImage> skia_image; sk_sp<SkImage> skia_image;
if (surface) { if (surface) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment