[PATCH xserver 14/15] dri3: s/intersect/window/ to match the names used in caller
Emil Velikov
emil.l.velikov at gmail.com
Mon Apr 2 15:41:25 UTC 2018
From: Emil Velikov <emil.velikov at collabora.com>
Cc: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Cc: Daniel Stone <daniels at collabora.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
dri3/dri3_screen.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c
index f5ca07934..2b0e139fa 100644
--- a/dri3/dri3_screen.c
+++ b/dri3/dri3_screen.c
@@ -167,8 +167,8 @@ cache_formats_and_modifiers(ScreenPtr screen)
int
dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable,
CARD8 depth, CARD8 bpp,
- CARD32 *num_intersect_modifiers,
- CARD64 **intersect_modifiers,
+ CARD32 *num_window_modifiers,
+ CARD64 **window_modifiers,
CARD32 *num_screen_modifiers,
CARD64 **screen_modifiers)
{
@@ -178,7 +178,7 @@ dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable,
int ret;
CARD32 num_drawable_mods;
CARD64 *drawable_mods;
- CARD64 *intersect_mods = NULL;
+ CARD64 *window_mods = NULL;
CARD64 *screen_mods = NULL;
CARD32 format;
dri3_dmabuf_format_ptr screen_format = NULL;
@@ -204,7 +204,7 @@ dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable,
if (screen_format->num_modifiers == 0) {
*num_screen_modifiers = 0;
- *num_intersect_modifiers = 0;
+ *num_window_modifiers = 0;
return Success;
}
@@ -217,44 +217,44 @@ dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable,
}
/* We're allocating slightly more memory than necessary but it reduces
- * the complexity of finding the intersection set.
+ * the complexity of finding the windowion set.
*/
screen_mods = malloc(screen_format->num_modifiers * sizeof(CARD64));
if (!screen_mods)
return BadAlloc;
if (num_drawable_mods > 0) {
- intersect_mods = malloc(screen_format->num_modifiers * sizeof(CARD64));
- if (!intersect_mods) {
+ window_mods = malloc(screen_format->num_modifiers * sizeof(CARD64));
+ if (!window_mods) {
free(screen_mods);
return BadAlloc;
}
}
*num_screen_modifiers = 0;
- *num_intersect_modifiers = 0;
+ *num_window_modifiers = 0;
for (i = 0; i < screen_format->num_modifiers; i++) {
CARD64 modifier = screen_format->modifiers[i];
- Bool intersect = FALSE;
+ Bool window_mod = FALSE;
for (j = 0; j < num_drawable_mods; j++) {
if (drawable_mods[j] == modifier) {
- intersect = TRUE;
+ window_mod = TRUE;
break;
}
}
- if (intersect) {
- intersect_mods[*num_intersect_modifiers] = modifier;
- *num_intersect_modifiers += 1;
+ if (window_mod) {
+ window_mods[*num_window_modifiers] = modifier;
+ *num_window_modifiers += 1;
} else {
screen_mods[*num_screen_modifiers] = modifier;
*num_screen_modifiers += 1;
}
}
- assert(*num_intersect_modifiers + *num_screen_modifiers == screen_format->num_modifiers);
+ assert(*num_window_modifiers + *num_screen_modifiers == screen_format->num_modifiers);
- *intersect_modifiers = intersect_mods;
+ *window_modifiers = window_mods;
*screen_modifiers = screen_mods;
free(drawable_mods);
--
2.16.0
More information about the xorg-devel
mailing list