* removed CopyRegionList, as it made no sense

* finally nailed that much hated bug where the
  wrong background underneath the cursor was restored.
  I always looked for this in the wrong place -
  of course, you cannot blit regions on top
  of the cursor and expect the backup of the
  background to be magically valid still... ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15461 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-12-10 10:42:26 +00:00
parent 12b29b9f1a
commit 7be34d3eb2
2 changed files with 3 additions and 34 deletions

View File

@ -69,9 +69,6 @@ public:
void CopyRegion(/*const*/ BRegion* region, void CopyRegion(/*const*/ BRegion* region,
int32 xOffset, int32 yOffset); int32 xOffset, int32 yOffset);
void CopyRegionList(BList* list, BList* pList,
int32 rCount, BRegion* clipReg);
void InvertRect(BRect r); void InvertRect(BRect r);
void DrawBitmap(ServerBitmap *bitmap, void DrawBitmap(ServerBitmap *bitmap,

View File

@ -265,7 +265,9 @@ DrawingEngine::CopyRegion(/*const*/ BRegion* region,
// This needs to be investigated, I'm doing this because of // This needs to be investigated, I'm doing this because of
// gut feeling. // gut feeling.
if (WriteLock()) { if (WriteLock()) {
fGraphicsCard->HideSoftwareCursor(region->Frame()); BRect frame = region->Frame();
frame = frame | frame.OffsetByCopy(xOffset, yOffset);
fGraphicsCard->HideSoftwareCursor(frame);
int32 count = region->CountRects(); int32 count = region->CountRects();
@ -375,36 +377,6 @@ DrawingEngine::CopyRegion(/*const*/ BRegion* region,
} }
} }
// CopyRegionList
//
// * used to move windows around on screen
// TODO: Since the regions are passed to CopyRegion() one by one,
// the case of different regions overlapping each other at source
// and/or dest locations is not handled.
// We also don't handle the case where multiple regions should have
// been combined into one larger region (with effectively the same
// rects), so that the sorting would compare them all at once. If
// this turns out to be a problem, we can easily rewrite the function
// here. In any case, to copy overlapping regions in app_server doesn't
// make much sense to me.
void
DrawingEngine::CopyRegionList(BList* list, BList* pList,
int32 rCount, BRegion* clipReg)
{
// NOTE: Write locking because we might use HW acceleration.
// This needs to be investigated, I'm doing this because of
// gut feeling.
if (WriteLock()) {
for (int32 i = 0; i < rCount; i++) {
BRegion* region = (BRegion*)list->ItemAt(i);
BPoint* offset = (BPoint*)pList->ItemAt(i);
CopyRegion(region, (int32)offset->x, (int32)offset->y);
}
WriteUnlock();
}
}
// InvertRect // InvertRect
void void
DrawingEngine::InvertRect(BRect r) DrawingEngine::InvertRect(BRect r)