[Piglit] [PATCH 3/3] gbm: Limit libcaca size for small tests
Jordan Justen
jordan.l.justen at intel.com
Sun Feb 1 15:34:41 PST 2015
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
tests/util/piglit-framework-gl/piglit_gbm_framework.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/util/piglit-framework-gl/piglit_gbm_framework.c b/tests/util/piglit-framework-gl/piglit_gbm_framework.c
index d6344f8..d2713f5 100644
--- a/tests/util/piglit-framework-gl/piglit_gbm_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_gbm_framework.c
@@ -129,8 +129,14 @@ determine_canvas_size(int *width, int *height)
((float)rows / piglit_height / font_aspect));
}
- *width = MAX2(1, columns);
- *height = MAX2(1, rows);
+ if (columns >= (piglit_width / font_aspect) && rows >= piglit_height) {
+ /* Yep, the console resolution is too high */
+ *width = MAX2(1, piglit_width / font_aspect);
+ *height = MAX2(1, piglit_height);
+ } else {
+ *width = MAX2(1, columns);
+ *height = MAX2(1, rows);
+ }
}
static void
--
2.1.4
More information about the Piglit
mailing list