Home | History | Annotate | Download | only in damage

Lines Matching refs:pDamage

116     DamagePtr	pDamage = getDrawableDamage(pDrawable)
184 for (; pDamage; pDamage = pNext) {
185 pNext = pDamage->pNext;
189 if (pScrPriv->internalLevel > 0 && !pDamage->isInternal) {
197 if (pDamage->pDrawable->type == DRAWABLE_WINDOW &&
198 !((WindowPtr) (pDamage->pDrawable))->realized) {
202 draw_x = pDamage->pDrawable->x;
203 draw_y = pDamage->pDrawable->y;
209 if (!WindowDrawable(pDamage->pDrawable->type)) {
210 draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x;
211 draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y;
220 if (clip || pDamage->pDrawable != pDrawable) {
222 if (pDamage->pDrawable->type == DRAWABLE_WINDOW) {
224 &((WindowPtr) (pDamage->pDrawable))->
232 box.x2 = draw_x + pDamage->pDrawable->width;
233 box.y2 = draw_y + pDamage->pDrawable->height;
250 pDrawable->id, pDamage->pDrawable->id));
259 if (pDamage->reportAfter)
260 RegionUnion(&pDamage->pendingDamage,
261 &pDamage->pendingDamage, pDamageRegion);
264 if (!pDamage->reportAfter) {
265 if (pDamage->damageReport)
266 DamageReportDamage(pDamage, pDamageRegion);
268 RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion);
290 for (; pDamage != NULL; pDamage = pDamage->pNext) {
291 if (pDamage->reportAfter) {
293 if (pDamage->damageReport)
294 DamageReportDamage(pDamage, &pDamage->pendingDamage);
296 RegionUnion(&pDamage->damage, &pDamage->damage,
297 &pDamage->pendingDamage);
300 if (pDamage->reportAfter)
301 RegionEmpty(&pDamage->pendingDamage);
1455 damageRemoveDamage(DamagePtr * pPrev, DamagePtr pDamage)
1458 if (*pPrev == pDamage) {
1459 *pPrev = pDamage->pNext;
1471 damageInsertDamage(DamagePtr * pPrev, DamagePtr pDamage)
1477 if (pOld == pDamage) {
1482 pDamage->pNext = *pPrev;
1483 *pPrev = pDamage;
1495 DamagePtr pDamage;
1497 while ((pDamage = *pPrev)) {
1498 damageRemoveDamage(pPrev, pDamage);
1499 if (!pDamage->isWindow)
1500 DamageDestroy(pDamage);
1550 DamagePtr pDamage;
1555 if ((pDamage = damageGetWinPriv(pWindow))) {
1559 while (pDamage) {
1560 damageRemoveDamage(pPrev, pDamage);
1561 pDamage = pDamage->pNextWin;
1567 if ((pDamage = damageGetWinPriv(pWindow))) {
1570 while (pDamage) {
1571 damageInsertDamage(pPrev, pDamage);
1572 pDamage = pDamage->pNextWin;
1580 DamagePtr pDamage;
1586 while ((pDamage = damageGetWinPriv(pWindow))) {
1587 DamageDestroy(pDamage);
1612 miDamageCreate(DamagePtr pDamage)
1633 pDamage)
1642 miDamageUnregister(DrawablePtr pDrawable, DamagePtr pDamage)
1651 miDamageDestroy(DamagePtr pDamage)
1717 DamagePtr pDamage;
1719 pDamage = calloc(1, sizeof(DamageRec));
1720 if (!pDamage)
1722 pDamage->pNext = 0;
1723 pDamage->pNextWin = 0;
1724 RegionNull(&pDamage->damage);
1725 RegionNull(&pDamage->pendingDamage);
1727 pDamage->damageLevel = damageLevel;
1728 pDamage->isInternal = isInternal;
1729 pDamage->closure = closure;
1730 pDamage->isWindow = FALSE;
1731 pDamage->pDrawable = 0;
1732 pDamage->reportAfter = FALSE;
1734 pDamage->damageReport = damageReport;
1735 pDamage->damageDestroy = damageDestroy;
1736 pDamage->pScreen = pScreen;
1738 (*pScrPriv->funcs.Create) (pDamage);
1740 return pDamage;
1744 DamageRegister(DrawablePtr pDrawable, DamagePtr pDamage)
1751 if (pDrawable->pScreen != pDamage->pScreen) {
1766 if (pOld == pDamage) {
1771 pDamage->pNextWin = *pPrev;
1772 *pPrev = pDamage;
1773 pDamage->isWindow = TRUE;
1776 pDamage->isWindow = FALSE;
1777 pDamage->pDrawable = pDrawable;
1778 damageInsertDamage(getDrawableDamageRef(pDrawable), pDamage);
1779 (*pScrPriv->funcs.Register) (pDrawable, pDamage);
1791 DamageUnregister(DamagePtr pDamage)
1793 DrawablePtr pDrawable = pDamage->pDrawable;
1798 (*pScrPriv->funcs.Unregister) (pDrawable, pDamage);
1809 if (*pPrev == pDamage) {
1810 *pPrev = pDamage->pNextWin;
1825 pDamage->pDrawable = 0;
1826 damageRemoveDamage(getDrawableDamageRef(pDrawable), pDamage);
1830 DamageDestroy(DamagePtr pDamage)
1832 ScreenPtr pScreen = pDamage->pScreen;
1836 if (pDamage->pDrawable)
1837 DamageUnregister(pDamage);
1839 if (pDamage->damageDestroy)
1840 (*pDamage->damageDestroy) (pDamage, pDamage->closure);
1841 (*pScrPriv->funcs.Destroy) (pDamage);
1842 RegionUninit(&pDamage->damage);
1843 RegionUninit(&pDamage->pendingDamage);
1844 free(pDamage);
1848 DamageSubtract(DamagePtr pDamage, const RegionPtr pRegion)
1852 DrawablePtr pDrawable = pDamage->pDrawable;
1854 RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion);
1868 RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y);
1869 RegionIntersect(&pDamage->damage, &pDamage->damage, pClip);
1870 RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y);
1874 return RegionNotEmpty(&pDamage->damage);
1878 DamageEmpty(DamagePtr pDamage)
1880 RegionEmpty(&pDamage->damage);
1884 DamageRegion(DamagePtr pDamage)
1886 return &pDamage->damage;
1890 DamagePendingRegion(DamagePtr pDamage)
1892 return &pDamage->pendingDamage;
1921 DamageSetReportAfterOp(DamagePtr pDamage, Bool reportAfter)
1923 pDamage->reportAfter = reportAfter;
1934 DamageReportDamage(DamagePtr pDamage, RegionPtr pDamageRegion)
1940 switch (pDamage->damageLevel) {
1942 RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion);
1943 (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
1947 RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
1949 RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion);
1950 (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
1955 tmpBox = *RegionExtents(&pDamage->damage);
1956 RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion);
1957 if (!BOX_SAME(&tmpBox, RegionExtents(&pDamage->damage))) {
1958 (*pDamage->damageReport) (pDamage, &pDamage->damage,
1959 pDamage->closure);
1963 was_empty = !RegionNotEmpty(&pDamage->damage);
1964 RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion);
1965 if (was_empty && RegionNotEmpty(&pDamage->damage)) {
1966 (*pDamage->damageReport) (pDamage, &pDamage->damage,
1967 pDamage->closure);
1971 RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion);