summaryrefslogtreecommitdiff
path: root/tests/weston-test-client-helper.h
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2014-12-15 15:51:25 -0800
committerBryce Harrington <bryce@osg.samsung.com>2015-05-21 15:05:40 -0700
commit273c285fa6a97db3753e87b4fd75f718b1855226 (patch)
treefa46748c3b511228675e528f672531d88875216b /tests/weston-test-client-helper.h
parent61a6436ae0b13c1732d2198849f908ddce291172 (diff)
downloadweston-273c285fa6a97db3753e87b4fd75f718b1855226.tar.gz
tests: Add surface checks
Introduce helper routines for testing surfaces against specific conditions. These allow tests to validate screen captures as displaying the correct rendering results. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Diffstat (limited to 'tests/weston-test-client-helper.h')
-rw-r--r--tests/weston-test-client-helper.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
index 43a5aa70..25640447 100644
--- a/tests/weston-test-client-helper.h
+++ b/tests/weston-test-client-helper.h
@@ -27,6 +27,7 @@
#include <assert.h>
#include <stdbool.h>
+
#include "weston-test-runner.h"
#include "weston-test-client-protocol.h"
@@ -132,6 +133,13 @@ struct surface {
void *data;
};
+struct rectangle {
+ int x;
+ int y;
+ int width;
+ int height;
+};
+
void *
fail_on_null(void *p);
@@ -190,4 +198,10 @@ screenshot_output_filename(const char *basename, uint32_t seq);
char*
screenshot_reference_filename(const char *basename, uint32_t seq);
+bool
+check_surfaces_equal(const struct surface *a, const struct surface *b);
+
+bool
+check_surfaces_match_in_clip(const struct surface *a, const struct surface *b, const struct rectangle *clip);
+
#endif