Exclude any dirty regions from scrolling or copybitting. The previous behavior,
which was also the BeOS behavior IIRC, has annoyed me a bit as an application developer. It wasn't possible to avoid display artifacts, if for example scrolling a view which needed to be redrawn at the same time. It sounds strange, but makes perfect sense for the situation I have here. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29101 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
10bc1510be
commit
740ea80754
@ -439,6 +439,7 @@ Window::CopyContents(BRegion* region, int32 xOffset, int32 yOffset)
|
||||
// is used directly)
|
||||
region->IntersectWith(&VisibleContentRegion());
|
||||
if (region->CountRects() > 0) {
|
||||
// Constrain to content region at destination
|
||||
region->OffsetBy(xOffset, yOffset);
|
||||
region->IntersectWith(&fVisibleContentRegion);
|
||||
if (region->CountRects() > 0) {
|
||||
@ -448,7 +449,16 @@ Window::CopyContents(BRegion* region, int32 xOffset, int32 yOffset)
|
||||
// the part which we can copy is not dirty
|
||||
newDirty->Exclude(region);
|
||||
|
||||
fDrawingEngine->CopyRegion(region, xOffset, yOffset);
|
||||
BRegion* copyRegion = fRegionPool.GetRegion(*region);
|
||||
if (copyRegion != NULL) {
|
||||
copyRegion->Exclude(&fPendingUpdateSession->DirtyRegion());
|
||||
copyRegion->Exclude(&fCurrentUpdateSession->DirtyRegion());
|
||||
copyRegion->Exclude(&fDirtyRegion);
|
||||
fDrawingEngine->CopyRegion(copyRegion, xOffset, yOffset);
|
||||
fRegionPool.Recycle(copyRegion);
|
||||
} else {
|
||||
fDrawingEngine->CopyRegion(region, xOffset, yOffset);
|
||||
}
|
||||
|
||||
// move along the already dirty regions that are common
|
||||
// with the region that we could copy
|
||||
|
Loading…
Reference in New Issue
Block a user