};
unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
- int count = 0;
+ int config_count = 0;
/* The nesting of loops is significant here. Also significant is the order
* of the HAL pixel formats. Many Android apps (such as Google's official
struct dri2_egl_config *dri2_conf =
dri2_add_config(dpy, dri2_dpy->driver_configs[j],
- count + 1, surface_type, config_attrs,
+ config_count + 1, surface_type, config_attrs,
visuals[i].rgba_masks);
if (dri2_conf) {
- if (dri2_conf->base.ConfigID == count + 1)
- count++;
+ if (dri2_conf->base.ConfigID == config_count + 1)
+ config_count++;
format_count[i]++;
}
}
}
}
- return (count != 0);
+ return (config_count != 0);
}
static int
};
unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
- unsigned int count = 0;
+ unsigned int config_count = 0;
for (unsigned i = 0; dri2_dpy->driver_configs[i]; i++) {
unsigned int red, alpha;
};
dri2_conf = dri2_add_config(disp, dri2_dpy->driver_configs[i],
- count + 1, EGL_WINDOW_BIT, attr_list, NULL);
+ config_count + 1, EGL_WINDOW_BIT, attr_list, NULL);
if (dri2_conf) {
- if (dri2_conf->base.ConfigID == count + 1)
- count++;
+ if (dri2_conf->base.ConfigID == config_count + 1)
+ config_count++;
format_count[j]++;
}
}
}
}
- return (count != 0);
+ return (config_count != 0);
}
static const struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
{ "RGB565", { 0x00f800, 0x07e0, 0x1f, 0x0 } },
};
unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
- unsigned int count = 0;
+ unsigned int config_count = 0;
for (unsigned i = 0; dri2_dpy->driver_configs[i] != NULL; i++) {
for (unsigned j = 0; j < ARRAY_SIZE(visuals); j++) {
struct dri2_egl_config *dri2_conf;
dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[i],
- count + 1, EGL_PBUFFER_BIT, NULL, visuals[j].rgba_masks);
+ config_count + 1, EGL_PBUFFER_BIT, NULL,
+ visuals[j].rgba_masks);
if (dri2_conf) {
- if (dri2_conf->base.ConfigID == count + 1)
- count++;
+ if (dri2_conf->base.ConfigID == config_count + 1)
+ config_count++;
format_count[j]++;
}
}
}
}
- return (count != 0);
+ return (config_count != 0);
}
static const struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = {
{
xcb_depth_iterator_t d;
xcb_visualtype_t *visuals;
- int count = 0;
+ int config_count = 0;
EGLint surface_type;
d = xcb_screen_allowed_depths_iterator(dri2_dpy->screen);
0,
};
- dri2_conf = dri2_add_config(disp, config, count + 1, surface_type,
- config_attrs, rgba_masks);
+ dri2_conf = dri2_add_config(disp, config, config_count + 1,
+ surface_type, config_attrs,
+ rgba_masks);
if (dri2_conf)
- if (dri2_conf->base.ConfigID == count + 1)
- count++;
+ if (dri2_conf->base.ConfigID == config_count + 1)
+ config_count++;
/* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig.
* Otherwise it will only match a 32-bit RGBA visual. On a
if (d.data->depth == 24) {
rgba_masks[3] =
~(rgba_masks[0] | rgba_masks[1] | rgba_masks[2]);
- dri2_conf = dri2_add_config(disp, config, count + 1, surface_type,
- config_attrs, rgba_masks);
+ dri2_conf = dri2_add_config(disp, config, config_count + 1,
+ surface_type, config_attrs,
+ rgba_masks);
if (dri2_conf)
- if (dri2_conf->base.ConfigID == count + 1)
- count++;
+ if (dri2_conf->base.ConfigID == config_count + 1)
+ config_count++;
}
}
}
xcb_depth_next(&d);
}
- if (!count) {
+ if (!config_count) {
_eglLog(_EGL_WARNING, "DRI2: failed to create any config");
return EGL_FALSE;
}