[webkit-dev] Testing feature suggestion: animation/interaction pixel-results "on the fly"

Dongsung Huang luxtella at company100.net
Wed Feb 13 21:38:11 PST 2013


I like this idea. I cannot find any harm if we have this functionality.
When a pixel test is more succinct, we can make a pixel test. When a
'getPixel on Javascript' test is more succinct, we can make a 'getPixel'
test.
As
http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree
said
'Pixel tests are a burden on every ports as any small change in the engine
could lead to your test needing a new pixel result.', new test
functionality that can be an alternative of pixel test is good!
philip canvas tests (LayoutTests/canvas/philip) has no pixel test because
of the power of getImageData API in canvas spec.

I can put two examples for the power of functionality that Noam suggested,

Case 1: CSS Filters & Shaders
I wanted this test functionality when I commented
http://webkit.org/b/97859#c19
If I want to make gaussian blur test, I prefer using 'getPixel' test as
follows,

ASSERT(getPixel(10, 10) = rgba(255, 0, 0, 255));
ASSERT(getPixel(10, 15) > rgba(255, 0, 0, 98) && getPixel(10, 15) <
rgba(255, 0, 0, 102));

If we don't have 'getPixel', we need to capture all port's image results
because all port's painting engine would make a bit different result. As
you know, it is painful.


Case 2: Fixed Position Element
I guess it is one of reasons why Noam suggested.
Currently, Qt and EFL AC (a.k.a Coordinated Graphics) has a problem related
to fixed position element.
During panning animation, Fixed position element is slightly flickering.

If we have 'getPixel', we can make a succinct test case.

PRECONDITION : a green fixed position div is on the white body. The rect of
the div is rect(10, 10, 30, 30).
function repeatedlyCalledDuringScrolling() {
    ASSERT(getPixel(15, 9) == white);
    ASSERT(getPixel(15, 10) == green);
    ASSERT(getPixel(9, 15) == white);
    ASSERT(getPixel(10, 15) == green);
    ....
}

WDYT?

Best regards,

Dongsung Huang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130214/d7feebdb/attachment.html>


More information about the webkit-dev mailing list