exa: reintroduce src rect optimisation, with a slightly higher threshold.

- I got some feedback on gtkperf line test regression.
- The increased threshold should ensure the destination optimisation is dominant.
This commit is contained in:
Maarten Maathuis 2009-02-16 20:41:14 +01:00
parent 46eeaf82e2
commit caa5310e16

View File

@ -257,6 +257,13 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
pExaPixmap->offscreen = save_offscreen; pExaPixmap->offscreen = save_offscreen;
pPixmap->devKind = save_pitch; pPixmap->devKind = save_pitch;
/* Try to prevent source valid region from growing too many rects by
* removing parts of it which are also in the destination valid region.
* Removing anything beyond that would lead to data loss.
*/
if (REGION_NUM_RECTS(pValidSrc) > 20)
REGION_SUBTRACT(pScreen, pValidSrc, pValidSrc, pValidDst);
/* The copied bits are now valid in destination */ /* The copied bits are now valid in destination */
REGION_UNION(pScreen, pValidDst, pValidDst, &CopyReg); REGION_UNION(pScreen, pValidDst, pValidDst, &CopyReg);