New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 712270 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocked on:
issue 712266

Blocking:
issue 634542



Sign in to add a comment

Add unit test to match canvas color space with media drawn to it

Project Member Reported by zakerinasab@chromium.org, Apr 17 2017

Issue description


When  crbug.com/712266  is fixed, add the attached unit test to CanvasRenderingContext2DTest.cpp.
 
CanvasAndMediaColorSpaceMatchUnitTest.cpp
2.8 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a7c6dee0214d03af859f4123671726becdbdb3a

commit 3a7c6dee0214d03af859f4123671726becdbdb3a
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Thu Aug 24 16:26:29 2017

Add unit test to match SkColorSpace and gfx::ColorSpace in CanvasColorParams

When drawing a color managed canvas, the target SkColorSpace is obtained by
calling CanvasColorParams::GetSkColorSpaceForSkSurfaces(). When drawing media
to the canvas, the target gfx::ColorSpace is returned by CanvasColorParams::
GfxColorSpace(). This test verifies that the two different color spaces
are approximately the same for different CanvasColorParam objects.
This test does not use SkColorSpace::Equals() since it is sensitive to
rounding issues (floats don't round-trip perfectly through ICC fixed point).
Instead, it color converts a pixel and compares the result.

Bug:  712270 
Change-Id: Icf6c0419c3ca5d36cb975eaa93f4d790fcaf4eef
Reviewed-on: https://chromium-review.googlesource.com/615031
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497077}
[modify] https://crrev.com/3a7c6dee0214d03af859f4123671726becdbdb3a/third_party/WebKit/Source/core/html/ImageDataTest.cpp
[modify] https://crrev.com/3a7c6dee0214d03af859f4123671726becdbdb3a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapTest.cpp
[modify] https://crrev.com/3a7c6dee0214d03af859f4123671726becdbdb3a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/3a7c6dee0214d03af859f4123671726becdbdb3a/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/3a7c6dee0214d03af859f4123671726becdbdb3a/third_party/WebKit/Source/platform/graphics/CanvasColorParamsTest.cpp
[add] https://crrev.com/3a7c6dee0214d03af859f4123671726becdbdb3a/third_party/WebKit/Source/platform/graphics/ColorCorrectionTestUtils.cpp
[add] https://crrev.com/3a7c6dee0214d03af859f4123671726becdbdb3a/third_party/WebKit/Source/platform/graphics/ColorCorrectionTestUtils.h

Status: Fixed (was: Assigned)
Blocking: 634542

Comment 4 Deleted

Sign in to add a comment