[Webkit-unassigned] [Bug 119082] Implement canvas blending tests to validate operators between different types of layers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 30 06:28:31 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=119082
Dirk Schulze <krit at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #207729|review? |review-
Flag| |
--- Comment #7 from Dirk Schulze <krit at webkit.org> 2013-07-30 06:28:17 PST ---
(From update of attachment 207729)
View in context: https://bugs.webkit.org/attachment.cgi?id=207729&action=review
> LayoutTests/ChangeLog:4
> + Validate that all blending operators work as expected for the following layer combinations:
Which layer combinations do you mean? You didn't list them. I assume you actually do not want to blend layers, but want to test blending in general in Canvas, right? IIRC I reviewed a bunch of tests from Rik already. What new value do these tests have?
> LayoutTests/fast/canvas/canvas-blending-clipping-expected.html:35
> + <script type="text/javascript">
> + var canvasElements = document.getElementsByTagName("canvas");
> + for (var i = 0; i < separateBlendmodes.length; ++i) {
> + var context = canvasElements[i].getContext("2d");
> + context.beginPath();
> + context.moveTo(3, 3);
> + context.lineTo(3, 7);
> + context.lineTo(7, 7);
> + context.lineTo(7, 3);
> + context.lineTo(3, 3);
> + context.clip();
> +
> + separateBlendColorsAndDrawInContext([129/255, 1, 129/255, 1], [1, 129/255, 129/255, 1],
> + context, separateBlendFunctions[separateBlendmodes[i]]);
> + }
You are actually testing normal blending within Canvas. You create a bunch of Canvas elements and do a pixel test. I would strongly suggest to convert all these tests to ref tests.
* Create just one Canvas element and one context,
* Draw your Source,
* Set the blend mode
* Draw your Destiantion
* Use getImageData and compare the colors with real values (take a small delta for different platforms)
* Clear the canvas
* Start the next test in the same canvas
You also do not need the layout structure. You can disable DRT and just concentrate on a bunch of pass messages.
Take a look at some tests in the fast/canvas directory for inspirations on how to write canvas tests without pixel results.
Again, Rik created a bunch of test cases and has a script to auto generate them partly. Maybe you contact him as well.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list