Commit Graph

10 Commits

Author SHA1 Message Date
Derek Foreman
97b9b17668 internal-screenshot-test: Fix endian problem
Use bit-shifts to properly generate pixel data.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-04 17:13:22 -07:00
Bryce Harrington
a291fcb949 tests: Drop redundant debug output
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-05-26 18:03:34 -07:00
Derek Foreman
35b7f25ae3 tests/internal-screenshot: Fix test so it doesn't expect shell surfaces
We no longer have a race with shell startup because we create our own
colored surface and check that it's properly drawn.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-05-26 11:26:06 +03:00
Bryce Harrington
0ccf8e2238 tests: cleanup whitespace 2015-05-21 15:26:06 -07:00
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