projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3e7bb4
)
redo xm_surface_release() to match i915
author
Brian
<brian.paul@tungstengraphics.com>
Wed, 7 Nov 2007 15:57:56 +0000
(08:57 -0700)
committer
Brian
<brian.paul@tungstengraphics.com>
Wed, 7 Nov 2007 15:57:56 +0000
(08:57 -0700)
src/mesa/pipe/xlib/xm_winsys.c
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/xlib/xm_winsys.c
b/src/mesa/pipe/xlib/xm_winsys.c
index d737e984d1c02f6a46b85376945d55b6d6c68b19..506923784c5c17830be81ff5d860e352157aed97 100644
(file)
--- a/
src/mesa/pipe/xlib/xm_winsys.c
+++ b/
src/mesa/pipe/xlib/xm_winsys.c
@@
-300,9
+300,12
@@
static void
xm_surface_release(struct pipe_winsys *winsys, struct pipe_surface **s)
{
struct pipe_surface *surf = *s;
- if (surf->region)
- winsys->region_release(winsys, &surf->region);
- free(surf);
+ surf->refcount--;
+ if (surf->refcount == 0) {
+ if (surf->region)
+ winsys->region_release(winsys, &surf->region);
+ free(surf);
+ }
*s = NULL;
}