From 72b8198e497571ba2aa4f5b2ed7a26ca80789dc0 Mon Sep 17 00:00:00 2001 From: suyambulingamrm Date: Fri, 30 May 2014 14:47:29 +0530 Subject: Issue #27. Enable MSAA by default. --- src/caskbench.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/caskbench.cpp') diff --git a/src/caskbench.cpp b/src/caskbench.cpp index 00e8ba4..d24781e 100644 --- a/src/caskbench.cpp +++ b/src/caskbench.cpp @@ -29,9 +29,8 @@ typedef struct _caskbench_options { char* surface_type; int size; int version; - - unsigned int enable_egl_sample_buffers; - char *shape_name; + unsigned int disable_egl_sample_buffers; + char * shape_name; int x_position; int y_position; int width; @@ -133,8 +132,8 @@ process_options(caskbench_options_t *opt, int argc, char *argv[]) {"version", 'V', POPT_ARG_NONE, &opt->version, 0, "Display the program version", NULL}, - {"enable-egl-sample-buffers", '\0', POPT_ARG_NONE, &opt->enable_egl_sample_buffers, 0, - "Sets EGL_SAMPLES=4 and EGL_SAMPLE_BUFFERS=1 in the EGL attribute list", + {"disable-egl-sample-buffers", '\0', POPT_ARG_NONE, &opt->disable_egl_sample_buffers, 0, + "Sets EGL_SAMPLES=4 and EGL_SAMPLE_BUFFERS=1 in the EGL attribute list by default unless otherwise specified by disable-egl-sample-buffers", NULL}, {"shape", 'S', POPT_ARG_STRING, &opt->shape_name, 0, "Controls which shape to be drawn ", @@ -372,6 +371,7 @@ main (int argc, char *argv[]) device_config_t config; int foo; + setenv("CAIRO_GL_COMPOSITOR", "msaa", 1); process_options(&opt, argc, argv); double run_time_values[opt.iterations]; @@ -390,7 +390,7 @@ main (int argc, char *argv[]) fp = fopen(opt.output_file, "w"); fprintf(fp, "[\n"); } - if (opt.enable_egl_sample_buffers) { + if (!opt.disable_egl_sample_buffers) { config.egl_samples = 4; config.egl_sample_buffers = 1; } -- cgit v1.3.1-4-g156e