projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cc5b16
)
added pipe_surface_unreference()
author
Brian
<brian.paul@tungstengraphics.com>
Fri, 10 Aug 2007 17:15:33 +0000
(11:15 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Fri, 10 Aug 2007 17:15:33 +0000
(11:15 -0600)
src/mesa/pipe/p_context.h
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/p_context.h
b/src/mesa/pipe/p_context.h
index 23961f4b8f59cfea6c2c8e0af5dc98434273ab6f..b5dd149603c9495c39e11f4e1ac988232f849461 100644
(file)
--- a/
src/mesa/pipe/p_context.h
+++ b/
src/mesa/pipe/p_context.h
@@
-248,6
+248,17
@@
pipe_surface_reference(struct pipe_surface **dst, struct pipe_surface *src)
}
}
+static INLINE void
+pipe_surface_unreference(struct pipe_surface **ps)
+{
+ assert(*ps);
+ (*ps)->refcount--;
+ if ((*ps)->refcount <= 0) {
+ /* XXX need a proper surface->free method */
+ free(*ps);
+ }
+ *ps = NULL;
+}
#endif /* PIPE_CONTEXT_H */