[Piglit] [PATCH 2/5] egl: Add fields egl_test::window_width, window_height
Chad Versace
chad at chad-versace.us
Wed Oct 19 18:37:47 PDT 2011
The default window dimension remains unchanged, 300x300.
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
tests/egl/egl-util.c | 6 ++++--
tests/egl/egl-util.h | 6 +++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/egl/egl-util.c b/tests/egl/egl-util.c
index 519c09f..41fc31f 100644
--- a/tests/egl/egl-util.c
+++ b/tests/egl/egl-util.c
@@ -45,6 +45,8 @@ egl_init_test(struct egl_test *test)
test->config_attribs = egl_default_attribs;
test->draw = NULL;
test->extensions = no_extensions;
+ test->window_width = egl_default_window_width;
+ test->window_height = egl_default_window_height;
}
EGLSurface
@@ -203,8 +205,8 @@ egl_util_run(const struct egl_test *test, int argc, char *argv[])
piglit_report_result(PIGLIT_FAIL);
}
- state.width = 300;
- state.height = 300;
+ state.width = test->window_width;
+ state.height = test->window_height;
create_window(&state);
state.surf = eglCreateWindowSurface(state.egl_dpy,
diff --git a/tests/egl/egl-util.h b/tests/egl/egl-util.h
index e796cd7..87c2db3 100644
--- a/tests/egl/egl-util.h
+++ b/tests/egl/egl-util.h
@@ -33,9 +33,10 @@ struct egl_test {
const EGLint *config_attribs;
const char **extensions;
enum piglit_result (*draw)(struct egl_state *state);
+ EGLint window_width;
+ EGLint window_height;
};
-
static const EGLint egl_default_attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT,
EGL_RED_SIZE, 1,
@@ -46,6 +47,9 @@ static const EGLint egl_default_attribs[] = {
EGL_NONE
};
+static const EGLint egl_default_window_width = 300;
+static const EGLint egl_default_window_height = 300;
+
/**
* \brief Initialize test to default values.
*/
--
1.7.6.4
More information about the Piglit
mailing list