diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/radeon.h b/src/radeon.h index f3a3e1c8..590966fd 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -96,6 +96,25 @@ struct _SyncFence; +#ifndef HAVE_REGIONDUPLICATE + +static inline RegionPtr +RegionDuplicate(RegionPtr pOld) +{ + RegionPtr pNew; + + pNew = RegionCreate(&pOld->extents, 0); + if (!pNew) + return NULL; + if (!RegionCopy(pNew, pOld)) { + RegionDestroy(pNew); + return NULL; + } + return pNew; +} + +#endif + #ifndef MAX #define MAX(a,b) ((a)>(b)?(a):(b)) #endif |