diff options
author | Chad Versace <chad@chad-versace.us> | 2011-10-19 16:14:30 -0700 |
---|---|---|
committer | Chad Versace <chad@chad-versace.us> | 2011-11-08 16:12:23 -0800 |
commit | c0403c04d8c9cdf5a8b82fb2193cfd7baeeb094d (patch) | |
tree | b50c4269f6fc66dfe3bafb3d319aa55208f4407e | |
parent | 34568a6c9f69755d68208c19afe66e5831d2d8e3 (diff) |
egl: Add fields egl_test::window_width,window_height
The default window dimension remains unchanged, 300x300.
Signed-off-by: Chad Versace <chad@chad-versace.us>
-rw-r--r-- | tests/egl/egl-util.c | 6 | ||||
-rw-r--r-- | 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. */ |