Commit 3043a5ce authored by Reza.Zakerinasab's avatar Reza.Zakerinasab Committed by Commit Bot

Move color managed canvas layout tests to fast/canvas

This CL fixes the issue with accelerated images color conversion by
converting accelerated images to software images. It also moves
color managed canvas layout tests to fast/canvas.

Bug: 695964, 844145
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I115cb30260bffdc6201894089f134cbcfe24bdf6
Reviewed-on: https://chromium-review.googlesource.com/1064566Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560652}
parent 52a43db1
...@@ -76,7 +76,6 @@ Bug(none) traversal/ [ Skip ] ...@@ -76,7 +76,6 @@ Bug(none) traversal/ [ Skip ]
Bug(none) typedcssom/ [ Skip ] Bug(none) typedcssom/ [ Skip ]
Bug(none) usb/ [ Skip ] Bug(none) usb/ [ Skip ]
Bug(none) vibration/ [ Skip ] Bug(none) vibration/ [ Skip ]
Bug(none) virtual/color_space/ [ Skip ]
Bug(none) virtual/cors-rfc1918/ [ Skip ] Bug(none) virtual/cors-rfc1918/ [ Skip ]
Bug(none) virtual/custom-user-timing/ [ Skip ] Bug(none) virtual/custom-user-timing/ [ Skip ]
Bug(none) virtual/disable-spv175/ [ Skip ] Bug(none) virtual/disable-spv175/ [ Skip ]
......
...@@ -67,7 +67,6 @@ Bug(none) webmidi/ [ Skip ] ...@@ -67,7 +67,6 @@ Bug(none) webmidi/ [ Skip ]
Bug(none) xmlviewer/ [ Skip ] Bug(none) xmlviewer/ [ Skip ]
Bug(none) virtual/android/ [ Skip ] Bug(none) virtual/android/ [ Skip ]
Bug(none) virtual/color_space/ [ Skip ]
Bug(none) virtual/enable_asmjs/ [ Skip ] Bug(none) virtual/enable_asmjs/ [ Skip ]
Bug(none) virtual/enable_wasm/ [ Skip ] Bug(none) virtual/enable_wasm/ [ Skip ]
Bug(none) virtual/exotic-color-space/ [ Skip ] Bug(none) virtual/exotic-color-space/ [ Skip ]
......
...@@ -59,7 +59,7 @@ crbug.com/24182 virtual/new-remote-playback-pipeline/media/controls/controls-cas ...@@ -59,7 +59,7 @@ crbug.com/24182 virtual/new-remote-playback-pipeline/media/controls/controls-cas
crbug.com/24182 virtual/video-surface-layer/media/controls/controls-cast-overlay-slow-fade.html [ Slow ] crbug.com/24182 virtual/video-surface-layer/media/controls/controls-cast-overlay-slow-fade.html [ Slow ]
crbug.com/24182 svg/filters/big-sized-filter.svg [ Slow ] crbug.com/24182 svg/filters/big-sized-filter.svg [ Slow ]
crbug.com/24182 tables/mozilla/other/slashlogo.html [ Slow ] crbug.com/24182 tables/mozilla/other/slashlogo.html [ Slow ]
crbug.com/24182 virtual/color_space/fast/canvas/color-space/canvas-colorManaged-toBlob-toDataURL.html [ Slow ] crbug.com/24182 fast/canvas/color-space/canvas-colorManaged-toBlob-toDataURL.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/canvas-blend-image.html [ Slow ] crbug.com/24182 virtual/gpu/fast/canvas/canvas-blend-image.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/canvas-blend-solid.html [ Slow ] crbug.com/24182 virtual/gpu/fast/canvas/canvas-blend-solid.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/canvas-composite-alpha.html [ Slow ] crbug.com/24182 virtual/gpu/fast/canvas/canvas-composite-alpha.html [ Slow ]
...@@ -77,6 +77,10 @@ crbug.com/24182 virtual/gpu/fast/canvas/canvas-strokeRect-gradient-shadow.html [ ...@@ -77,6 +77,10 @@ crbug.com/24182 virtual/gpu/fast/canvas/canvas-strokeRect-gradient-shadow.html [
crbug.com/24182 virtual/gpu/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-jpeg.html [ Slow ] crbug.com/24182 virtual/gpu/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-jpeg.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html [ Slow ] crbug.com/24182 virtual/gpu/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-png.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-webp.html [ Slow ] crbug.com/24182 virtual/gpu/fast/canvas/canvas-toBlob-toDataURL-race-imageEncoder-webp.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/color-space/canvas-colorManaged-toBlob-toDataURL.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/color-space/canvas-createImageBitmap-linear-rgb.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/color-space/canvas-createImageBitmap-p3.html [ Slow ]
crbug.com/24182 virtual/gpu/fast/canvas/color-space/canvas-createImageBitmap-rec2020.html [ Slow ]
crbug.com/24182 fast/dom/timer-throttling-background-page-near-alignment-interval.html [ Slow ] crbug.com/24182 fast/dom/timer-throttling-background-page-near-alignment-interval.html [ Slow ]
crbug.com/24182 http/tests/perf/large-inlined-script.html [ Slow ] crbug.com/24182 http/tests/perf/large-inlined-script.html [ Slow ]
crbug.com/24182 fast/css/should-not-insert-stylesheet-into-detached-document.html [ Slow ] crbug.com/24182 fast/css/should-not-insert-stylesheet-into-detached-document.html [ Slow ]
......
...@@ -407,6 +407,7 @@ fast/canvas/alpha.html ...@@ -407,6 +407,7 @@ fast/canvas/alpha.html
fast/canvas/canvas-set-font-with-updated-style.html fast/canvas/canvas-set-font-with-updated-style.html
fast/canvas/bug535171.html fast/canvas/bug535171.html
fast/canvas/canvas-hides-fallback.html fast/canvas/canvas-hides-fallback.html
fast/canvas/color-space/imageData-colorSpace.html
fast/canvas/feimage-with-foreignobject-taint-canvas-2.html fast/canvas/feimage-with-foreignobject-taint-canvas-2.html
fast/canvas/imagebitmap/transferFromImageBitmap-drawImage.html fast/canvas/imagebitmap/transferFromImageBitmap-drawImage.html
fast/canvas/script-inside-canvas-fallback.html fast/canvas/script-inside-canvas-fallback.html
...@@ -971,7 +972,6 @@ traversal/tree-walker-004.html ...@@ -971,7 +972,6 @@ traversal/tree-walker-004.html
typedcssom/computedstyle/left.html typedcssom/computedstyle/left.html
typedcssom/inlinestyle/inlineStylePropertyMap_getAll.html typedcssom/inlinestyle/inlineStylePropertyMap_getAll.html
vibration/vibration-page-visibility.html vibration/vibration-page-visibility.html
virtual/color_space/fast/canvas/color-space/imageData-colorSpace.html
virtual/gpu/fast/canvas/canvas-filter-frameless-document.html virtual/gpu/fast/canvas/canvas-filter-frameless-document.html
virtual/gpu/fast/canvas/feimage-with-foreignobject-taint-canvas-2.html virtual/gpu/fast/canvas/feimage-with-foreignobject-taint-canvas-2.html
virtual/gpu-rasterization/images/drag-image-descendant-painting-sibling.html virtual/gpu-rasterization/images/drag-image-descendant-painting-sibling.html
......
[ [
{
"prefix": "color_space",
"base": "fast/canvas/color-space",
"args": ["--force-color-profile=srgb"]
},
{ {
"prefix": "custom-user-timing", "prefix": "custom-user-timing",
"base": "http/tests/performance-timing/custom-user-timing", "base": "http/tests/performance-timing/custom-user-timing",
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// No matter what is the color space and pixel format of the color managed // No matter what is the color space and pixel format of the color managed
......
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// The reference values are generated by calling SkImage::makeColorSpace() // The reference values are generated by calling SkImage::makeColorSpace()
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// The reference values are generated by calling SkImage::makeColorSpace() // The reference values are generated by calling SkImage::makeColorSpace()
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// The reference values are generated by calling SkImage::makeColorSpace() // The reference values are generated by calling SkImage::makeColorSpace()
......
<!DOCTYPE html> <!DOCTYPE html>
<body> <body>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
var xWidth = xHeight = 10; var xWidth = xHeight = 10;
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// The reference values are generated by calling SkImage::makeColorSpace() // The reference values are generated by calling SkImage::makeColorSpace()
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// The reference values are generated by calling SkImage::makeColorSpace() // The reference values are generated by calling SkImage::makeColorSpace()
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// The reference values are generated by calling SkImage::makeColorSpace() // The reference values are generated by calling SkImage::makeColorSpace()
......
<!DOCTYPE html> <!DOCTYPE html>
<body> <body>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
test(drawSRGBThenGetImageDataLinearRGB, 'tests drawing SRGB color on LinearRGB \ test(drawSRGBThenGetImageDataLinearRGB, 'tests drawing SRGB color on LinearRGB \
canvas and getting LinearRGB image data.'); canvas and getting LinearRGB image data.');
......
<!DOCTYPE html> <!DOCTYPE html>
<body> <body>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
test(drawSRGBThenGetImageDataP3, test(drawSRGBThenGetImageDataP3,
'tests drawing SRGB color on P3 canvas and getting image data in P3.'); 'tests drawing SRGB color on P3 canvas and getting image data in P3.');
......
<!DOCTYPE html> <!DOCTYPE html>
<body> <body>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
test(drawSRGBThenGetImageDataRec2020, 'tests drawing SRGB color on Rec2020 \ test(drawSRGBThenGetImageDataRec2020, 'tests drawing SRGB color on Rec2020 \
canvas and getting Rec2020 image data.'); canvas and getting Rec2020 image data.');
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// This layout test examines the behavior of ImageData thoroughly to make // This layout test examines the behavior of ImageData thoroughly to make
......
<!DOCTYPE html> <!DOCTYPE html>
<body> <body>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
var dataU8 = new Uint8ClampedArray([255, 192, 128, 64]); var dataU8 = new Uint8ClampedArray([255, 192, 128, 64]);
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
test(function() { test(function() {
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
......
<!DOCTYPE HTML> <!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script> <script src="../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script> <script src="../../../resources/testharnessreport.js"></script>
<script> <script>
// This test examines the color managed ImageBitmapRenderingContext. // This test examines the color managed ImageBitmapRenderingContext.
......
# This suite runs the tests in LayoutTests/fast/canvas/color-space with --enable-color-correct-rendering.
# See the virtual_test_suites() method in tools/blinkpy/web_tests/port/base.py.
...@@ -91,13 +91,21 @@ scoped_refptr<StaticBitmapImage> StaticBitmapImage::ConvertToColorSpace( ...@@ -91,13 +91,21 @@ scoped_refptr<StaticBitmapImage> StaticBitmapImage::ConvertToColorSpace(
if (SkColorSpace::Equals(src_color_space.get(), dst_color_space.get())) if (SkColorSpace::Equals(src_color_space.get(), dst_color_space.get()))
return this; return this;
// crbug.com/844145: Remove this when GPU-backed SkImage supports color
// covnersion for kRespect TransferFnBehavior (skia:6553).
if (skia_image->isTextureBacked() &&
transfer_function_behavior == SkTransferFunctionBehavior::kRespect) {
skia_image = skia_image->makeNonTextureImage();
}
sk_sp<SkImage> converted_skia_image = sk_sp<SkImage> converted_skia_image =
skia_image->makeColorSpace(dst_color_space, transfer_function_behavior); skia_image->makeColorSpace(dst_color_space, transfer_function_behavior);
DCHECK(converted_skia_image.get()); DCHECK(converted_skia_image.get());
DCHECK(skia_image.get() != converted_skia_image.get()); DCHECK(skia_image.get() != converted_skia_image.get());
return StaticBitmapImage::Create(converted_skia_image, return StaticBitmapImage::Create(converted_skia_image,
ContextProviderWrapper()); converted_skia_image->isTextureBacked()
? ContextProviderWrapper()
: nullptr);
} }
bool StaticBitmapImage::ConvertToArrayBufferContents( bool StaticBitmapImage::ConvertToArrayBufferContents(
......
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