diff options
author | Timothy Arceri <[email protected]> | 2017-04-08 10:47:12 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-04-10 10:55:34 +1000 |
commit | d9fe82fe4198425cd42081e7fd5bd7ac69aacdd2 (patch) | |
tree | 6856c6f7f1535504544bf84820e35be1b39107ea /src/mesa/drivers | |
parent | a85b4e57198b3dc9d6b26ef84506ec995fd4889b (diff) |
x11: take ownership rather than adding reference for new renderbuffers
This avoids locking in the reference calls and fixes a leak after the
RefCount initialisation was change from 0 to 1.
Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation)
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 82c4d188d5a..5be8aa95de1 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -311,8 +311,8 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, b->frontxrb->Parent = b; b->frontxrb->drawable = d; b->frontxrb->pixmap = (XMesaPixmap) d; - _mesa_add_renderbuffer(&b->mesa_buffer, BUFFER_FRONT_LEFT, - &b->frontxrb->Base.Base); + _mesa_add_renderbuffer_without_ref(&b->mesa_buffer, BUFFER_FRONT_LEFT, + &b->frontxrb->Base.Base); /* * Back renderbuffer @@ -328,8 +328,8 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, /* determine back buffer implementation */ b->db_mode = vis->ximage_flag ? BACK_XIMAGE : BACK_PIXMAP; - _mesa_add_renderbuffer(&b->mesa_buffer, BUFFER_BACK_LEFT, - &b->backxrb->Base.Base); + _mesa_add_renderbuffer_without_ref(&b->mesa_buffer, BUFFER_BACK_LEFT, + &b->backxrb->Base.Base); } /* |