I couldn't resist playing some more with ezprof. I don't know if I can trust it's results though, revealing as they are. Somebody should explain to me why forgetting a return *this; in an operator= method works in the first place, and why it results in the constructor being called.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15255 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-11-30 23:03:05 +00:00
parent b32a299f2a
commit d0e89d5302
3 changed files with 21 additions and 8 deletions

View File

@ -14,7 +14,7 @@
// constructor
Desktop::Desktop(DrawView* drawView)
: BLooper("desktop"),
: BLooper("desktop", B_URGENT_DISPLAY_PRIORITY),
fTracking(false),
fLastMousePos(-1.0, -1.0),
fClickedWindow(NULL),
@ -144,13 +144,13 @@ Desktop::MouseMoved(BPoint where, uint32 code, const BMessage* dragMessage)
if (dx != 0 || dy != 0) {
if (fClickedWindow) {
bigtime_t now = system_time();
//bigtime_t now = system_time();
if (fResizing) {
ResizeWindowBy(fClickedWindow, dx, dy);
printf("resizing: %lld\n", system_time() - now);
//printf("resizing: %lld\n", system_time() - now);
} else {
MoveWindowBy(fClickedWindow, dx, dy);
printf("moving: %lld\n", system_time() - now);
//printf("moving: %lld\n", system_time() - now);
}
}
}

View File

@ -155,7 +155,19 @@ void
WindowLayer::GetBorderRegion(BRegion* region)
{
if (!fBorderRegionValid) {
// TODO: speed up by avoiding "Exclude()"
fBorderRegion.Set(BRect(fFrame.left - 4, fFrame.top - 20,
(fFrame.left + fFrame.right) / 2, fFrame.top - 5));
fBorderRegion.Include(BRect(fFrame.left - 4, fFrame.top - 4,
fFrame.right + 4, fFrame.top - 1));
fBorderRegion.Include(BRect(fFrame.left - 4, fFrame.top,
fFrame.left - 1, fFrame.bottom));
fBorderRegion.Include(BRect(fFrame.right + 1, fFrame.top,
fFrame.right + 4, fFrame.bottom - 11));
fBorderRegion.Include(BRect(fFrame.left - 4, fFrame.bottom + 1,
fFrame.right - 11, fFrame.bottom + 4));
fBorderRegion.Include(BRect(fFrame.right - 10, fFrame.bottom - 10,
fFrame.right + 4, fFrame.bottom + 4));
/* // TODO: speed up by avoiding "Exclude()"
// start from the frame, extend to include decorator border
fBorderRegion.Set(BRect(fFrame.left - 4, fFrame.top - 4,
fFrame.right + 4, fFrame.bottom + 4));
@ -169,7 +181,7 @@ WindowLayer::GetBorderRegion(BRegion* region)
// resize handle
// if (B_DOCUMENT_WINDOW_LOOK)
fBorderRegion.Include(BRect(fFrame.right - 10, fFrame.bottom - 10,
fFrame.right, fFrame.bottom));
fFrame.right, fFrame.bottom));*/
fBorderRegionValid = true;
}
@ -779,6 +791,7 @@ UpdateSession::operator=(const UpdateSession& other)
{
fDirtyRegion = other.fDirtyRegion;
fInUse = other.fInUse;
return *this;
}

View File

@ -181,14 +181,14 @@ Window::Test()
AddWindow(frame, name.String());
}
frame.Set(10, 80, 320, 290);
/* frame.Set(10, 80, 320, 290);
for (int32 i = 20; i < 40; i++) {
BString name("Window ");
frame.OffsetBy(20, 15);
name << i + 1;
AddWindow(frame, name.String());
}
/*
frame.Set(20, 140, 330, 230);
for (int32 i = 40; i < 60; i++) {
BString name("Window ");