mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
added pipe_surface_unreference()
This commit is contained in:
parent
3cc5b1645b
commit
0aa8b1643b
1 changed files with 11 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue