one bug fixed, three more to go

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15162 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-11-26 14:51:35 +00:00
parent cfc40fb337
commit 27b740633e
2 changed files with 15 additions and 10 deletions

View File

@ -538,6 +538,15 @@ Desktop::MarkDirty(BRegion* region)
if (LockClipping()) { if (LockClipping()) {
// add the new dirty region to the culmulative dirty region // add the new dirty region to the culmulative dirty region
fDirtyRegion.Include(region); fDirtyRegion.Include(region);
if (fDrawingEngine->Lock()) {
fDrawingEngine->SetHighColor(255, 0, 0);
fDrawingEngine->FillRegion(region);
fDrawingEngine->MarkDirty(region);
fDrawingEngine->Unlock();
snooze(100000);
}
// send redraw messages to all windows intersecting the dirty region // send redraw messages to all windows intersecting the dirty region
_TriggerWindowRedrawing(region); _TriggerWindowRedrawing(region);

View File

@ -313,26 +313,22 @@ void
WindowLayer::_DrawContents(ViewLayer* layer) WindowLayer::_DrawContents(ViewLayer* layer)
{ {
//printf("%s - DrawContents()\n", Name()); //printf("%s - DrawContents()\n", Name());
#if SLOW_DRAWING
snooze(10000);
#endif
if (!layer) if (!layer)
layer = fTopLayer; layer = fTopLayer;
if (fDesktop->ReadLockClipping()) { if (fDesktop->ReadLockClipping()) {
BRegion effectiveWindowClipping(fVisibleContentRegion); BRegion dirtyContentRegion(fVisibleContentRegion);
effectiveWindowClipping.IntersectWith(fDesktop->DirtyRegion()); dirtyContentRegion.IntersectWith(fDesktop->DirtyRegion());
if (effectiveWindowClipping.Frame().IsValid()) { if (dirtyContentRegion.CountRects() > 0) {
// send UPDATE message to the client // send UPDATE message to the client
_MarkContentDirty(&effectiveWindowClipping); _MarkContentDirty(&dirtyContentRegion);
layer->Draw(fDrawingEngine, &effectiveWindowClipping, layer->Draw(fDrawingEngine, &dirtyContentRegion,
&fVisibleContentRegion, true); &fVisibleContentRegion, true);
fDesktop->MarkClean(&fContentRegion); fDesktop->MarkClean(&dirtyContentRegion);
} }
fDesktop->ReadUnlockClipping(); fDesktop->ReadUnlockClipping();