Merge ce2bcc0a4f
into d403cbd25c
This commit is contained in:
commit
89ad932973
|
@ -1714,7 +1714,8 @@ DamageCreate(DamageReportFunc damageReport,
|
|||
pDamage->damageDestroy = damageDestroy;
|
||||
pDamage->pScreen = pScreen;
|
||||
|
||||
(*pScrPriv->funcs.Create) (pDamage);
|
||||
if (pScrPriv->funcs.Create)
|
||||
pScrPriv->funcs.Create (pDamage);
|
||||
|
||||
return pDamage;
|
||||
}
|
||||
|
@ -1755,7 +1756,8 @@ DamageRegister(DrawablePtr pDrawable, DamagePtr pDamage)
|
|||
pDamage->isWindow = FALSE;
|
||||
pDamage->pDrawable = pDrawable;
|
||||
damageInsertDamage(getDrawableDamageRef(pDrawable), pDamage);
|
||||
(*pScrPriv->funcs.Register) (pDrawable, pDamage);
|
||||
if (pScrPriv->funcs.Register)
|
||||
pScrPriv->funcs.Register (pDrawable, pDamage);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1774,7 +1776,8 @@ DamageUnregister(DamagePtr pDamage)
|
|||
|
||||
damageScrPriv(pScreen);
|
||||
|
||||
(*pScrPriv->funcs.Unregister) (pDrawable, pDamage);
|
||||
if (pScrPriv->funcs.Unregister)
|
||||
pScrPriv->funcs.Unregister (pDrawable, pDamage);
|
||||
|
||||
if (pDrawable->type == DRAWABLE_WINDOW) {
|
||||
WindowPtr pWindow = (WindowPtr) pDrawable;
|
||||
|
@ -1817,7 +1820,10 @@ DamageDestroy(DamagePtr pDamage)
|
|||
|
||||
if (pDamage->damageDestroy)
|
||||
(*pDamage->damageDestroy) (pDamage, pDamage->closure);
|
||||
(*pScrPriv->funcs.Destroy) (pDamage);
|
||||
|
||||
if (pScrPriv->funcs.Destroy)
|
||||
pScrPriv->funcs.Destroy (pDamage);
|
||||
|
||||
RegionUninit(&pDamage->damage);
|
||||
RegionUninit(&pDamage->pendingDamage);
|
||||
free(pDamage);
|
||||
|
|
|
@ -46,6 +46,21 @@ typedef void (*DamageScreenRegisterFunc) (DrawablePtr, DamagePtr);
|
|||
typedef void (*DamageScreenUnregisterFunc) (DrawablePtr, DamagePtr);
|
||||
typedef void (*DamageScreenDestroyFunc) (DamagePtr);
|
||||
|
||||
/* @public
|
||||
*
|
||||
* @brief Driver callbacks for getting notified on several damage calls
|
||||
*
|
||||
* The pointer to this struct can be obtained via DamageGetScreenFuncs().
|
||||
* Drivers can inject themselves here, in order to get notified on
|
||||
* DamageCreate(), DamageRegister(), DamageUnregister(), DamageDestroy().
|
||||
*
|
||||
* The fields may be assigned to NULL, if no action at all is wanted.
|
||||
* (by default assigned to default implementations)
|
||||
*
|
||||
* This should ONLY be touched by video drivers, nobody else.
|
||||
*
|
||||
* So far the only one using it is the proprietary NVidia driver.
|
||||
*/
|
||||
typedef struct _damageScreenFuncs {
|
||||
DamageScreenCreateFunc Create;
|
||||
DamageScreenRegisterFunc Register;
|
||||
|
|
Loading…
Reference in New Issue