Commit graph

6 commits

Author SHA1 Message Date
Bryce Harrington c919883d26 tests: Check that the PNG file's stride matches our internal assumption
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-05-21 15:10:37 -07:00
Bryce Harrington 111e022e91 tests: Add capture_screenshot_of_output()
Provides a convenience function for JFDI grabbing of a single
screenshot.  Tests that are doing multiple screenshots or other
fanciness probably will bypass this routine and do things more manually,
but this'll provide a reference implementation.  And hopefully there'll
be enough simple cases that this actually is useful.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-05-21 15:06:43 -07:00
Bryce Harrington 198f941ec8 tests: Add load_surface_from_png()
Loads an image from disk via cairo, and copies data into a weston test
surface for internal use.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-05-21 15:06:31 -07:00
Bryce Harrington 2eaf7d78ba tests: Add create_screenshot_surface()
Refactor out the screenshot shm buffer creation code.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-05-21 15:06:26 -07:00
Bryce Harrington 85e65f5fe5 tests: Add write_surface_as_png() helper
And use the helper routine for generating the output filename.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-05-21 15:06:15 -07:00
Bryce Harrington fb9089d4f5 tests: Add internal test for the weston test screenshot capability
This also serves as a proof of concept of the screen capture
functionality and as a demo for snapshot-based rendering verification.
Implements screenshot saving clientside in the test itself.

This also demonstrates use of test-specific configuration files, in this
case to disable fadein animations and background images.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-05-21 15:06:11 -07:00