Commit 3fd45a45 authored by Kenneth Russell's avatar Kenneth Russell Committed by Commit Bot

Check for presence of Skia image when determining colorspace conversion.

Regression test being added to WebGL conformance suite in
https://github.com/KhronosGroup/WebGL/pull/3087 .

Bug: 1085044
Change-Id: I2bf2f58a61e42dc360fe6e9c2fb54a4ec896dc5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2220812Reviewed-by: default avatarShrek Shao <shrekshao@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773254}
parent 1f93acff
......@@ -2815,7 +2815,7 @@ void WebGLImageConversion::ImageExtractor::ExtractImage(
bool has_alpha = skia_image ? !skia_image->isOpaque() : true;
bool need_unpremultiplied = has_alpha && !premultiply_alpha;
bool need_color_conversion = !ignore_color_space &&
bool need_color_conversion = !ignore_color_space && skia_image &&
skia_image->colorSpace() &&
!skia_image->colorSpace()->isSRGB();
if ((!skia_image || ignore_color_space || need_unpremultiplied ||
......
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