* fixed scrolling for the current clipping code, it brings

up a new problem, maybe Adi has an idea for the fix, see
  comment in the code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14451 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-10-20 13:06:38 +00:00
parent da6d1a7022
commit dd79576b10

View File

@ -1854,8 +1854,16 @@ Layer::do_CopyBits(BRect& src, BRect& dst, int32 xOffset, int32 yOffset) {
// the region that is going to be copied
BRegion copyRegion(src);
// apply the current clipping of the layer
copyRegion.IntersectWith(&fVisible);
// don't scroll regions that are pending for
// (or already in) an update
// NOTE: this fixes the visible glitches that resulted from
// scrolling, but it brings up a new problem, which looks
// like the the client receives multiple update messages for
// the same area
// NOTE2: if you don't include both regions, it doesn't work
copyRegion.Exclude(&fOwner->CulmulatedUpdateRegion());
copyRegion.Exclude(&fOwner->RegionToBeUpdated());
// offset the region to the destination
// and apply the current clipping there as well