summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_surfaceless.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-06-22 11:00:41 -0700
committerChad Versace <[email protected]>2017-06-22 12:35:49 -0700
commitffbf50b1c67b90c6f45e9128e4ff6ef9c4ac5c29 (patch)
tree942da89ebcbf8bcfff6ed8564bbcad1fcd8dd373 /src/egl/drivers/dri2/platform_surfaceless.c
parenta6fad5596141667b0986f083996b05ca829d1f45 (diff)
egl: Rename 'count' in ${platform}_add_configs_for_visuals (v2)
Rename 'count' to 'config_count'. I didn't understand what the variable did until I untangled the for-loops. Now the next person won't have that problem. v2: Rebase. Fix typo. Apply to all platforms (for emil). Reviewed-by: Eric Engestrom <[email protected]> (v1)
Diffstat (limited to 'src/egl/drivers/dri2/platform_surfaceless.c')
-rw-r--r--src/egl/drivers/dri2/platform_surfaceless.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index d780ce4955c..1091b4febdb 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -201,18 +201,19 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
{ "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]++;
}
}
@@ -225,7 +226,7 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
}
}
- return (count != 0);
+ return (config_count != 0);
}
static const struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = {