From c0403c04d8c9cdf5a8b82fb2193cfd7baeeb094d Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Wed, 19 Oct 2011 16:14:30 -0700 Subject: egl: Add fields egl_test::window_width,window_height The default window dimension remains unchanged, 300x300. Signed-off-by: Chad Versace --- 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 519c09fa9..41fc31f79 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 e796cd7c3..87c2db377 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. */ -- cgit v1.2.3