summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorMartin Roukala (né Peres) <martin.roukala@mupuf.org>2022-11-24 08:38:17 +0200
committerMarge Bot <emma+marge@anholt.net>2022-11-25 20:08:45 +0000
commit0cee008fee1dc0365cfb767ff7acf03f2127a03b (patch)
treedabaf995f1eb074e39ff12a1c78693e46a1ce84b /src/glx
parent797454edfcc4d2a6d0c21db451e9a0ea6e0a8023 (diff)
downloadmesa-0cee008fee1dc0365cfb767ff7acf03f2127a03b.tar.gz
Revert "glx: Fix drawable refcounting for naked Windows"
This reverts commit 768238fdc06eed3dce36da3baf811cb70db42b5c which is not only leading to memory leaks, but also reportedly breaks KDE pretty badly. Fixes: #7674, #7435 Acked-by: Michel Dänzer <mdaenzer@redhat.com> Acked-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19972>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/dri_common.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index d806d8cab41..bf14c919bf6 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -416,14 +416,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
(*pdraw->destroyDrawable) (pdraw);
return NULL;
}
- /* This sure does look suspicious, doesn't it? We're on this path because
- * this is a naked Window. GLX 1.3 drawables have an explicit creation
- * step (setting refcount to 1), and those we would have found in the
- * hash lookup above, bumped their refcount for the bind_context we're
- * being called for, and then returned. But since we just created the
- * internal naked-Window state, we need to account for both here.
- */
- pdraw->refcount = 2;
+ pdraw->refcount = 1;
return pdraw;
}