mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 01:40:22 +01:00
clover: Override ret_object.
Return an API object from an intrusive reference to a Clover object, incrementing the reference count of the object. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
This commit is contained in:
parent
85309e8b55
commit
70fe6267a3
1 changed files with 11 additions and 0 deletions
|
|
@ -68,6 +68,17 @@ namespace clover {
|
|||
*p = desc(v());
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Return an API object from an intrusive reference to a Clover object,
|
||||
/// incrementing the reference count of the object.
|
||||
///
|
||||
template<typename T>
|
||||
typename T::descriptor_type *
|
||||
ret_object(const intrusive_ref<T> &v) {
|
||||
v().retain();
|
||||
return desc(v());
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue