[webkit-reviews] review requested: [Bug 21322] DumpRenderTree pixel test improvements : [Attachment 24588] Complete patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 22 21:06:25 PDT 2008


Pierre-Olivier Latour <pol at apple.com> has asked  for review:
Bug 21322: DumpRenderTree pixel test improvements
https://bugs.webkit.org/show_bug.cgi?id=21322

Attachment 24588: Complete patch v1
https://bugs.webkit.org/attachment.cgi?id=24588&action=edit

------- Additional Comments from Pierre-Olivier Latour <pol at apple.com>
Primary changes in DumpRenderTree:
- Ensure font smoothing is disabled (this is also called LCD anti-aliasing and
is different from regular font CG anti-aliasing) as font-smoothing settings
depends on the display and can also be changed by the user
- Use a new cleared buffer for each test instead of the reusing same one to
avoid potential result corruption across tests
- Can now receive the expected pixel hash as a suffix to the test path or
url as "path'hash"
- Make sure hash is computed in a endian-independent way
- Improve the code that sets/restores the screen color profile
- Make the code more cross-platformy with std::string goodness
- Added an "on-screen" mode where the snapshot will take into account surfaces
on the window (like OpenGL content): this uses the new CG APIs on 10.5 or
reading from the display framebuffer on 10.4. This mode is not active by
default for performance reason, but must be explicitly activated from the test
file using the new "testOnscreen()" JS API.

Primary changes in ImageDiff:
- Provide a new comparison algorithm that is more tolerant to "acceptable"
failures (i.e. very small differences in font rendering, which --threshold is
not really good at handling)
- Generate normalized intensity-only diff images

Primary changes in run-webkit-tests:
- Take advantage of hashes for pixel tests which makes them much faster by
minimizing image comparisons
- Removed repaint options as these should be set from within test files using
JS API
- Replaced "threshold" option in  by "tolerance" expressed in percents
- Added more logging when in "verbose" mode

Notes:
- Tested on various PPC and X86 machines running 10.5.4 as well as PPC running
10.4.11 and X86 running SnowLeopard
- Made sure WebKit still builds on Windows
- This patch will require to redo all reference images in LayoutTests to really
take advantage of the new features

Finally, the current version of this patch does not include the ChangeLog,
since there will likely be changes to be made anyway.


More information about the webkit-reviews mailing list