speed up from/to screen conversion of BRects
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16256 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6db8ca1c92
commit
4167cbe823
|
@ -740,17 +740,9 @@ BView::ConvertFromScreen(BPoint pt) const
|
||||||
void
|
void
|
||||||
BView::ConvertToScreen(BRect *rect) const
|
BView::ConvertToScreen(BRect *rect) const
|
||||||
{
|
{
|
||||||
if (!fParent) {
|
BPoint offset(0.0, 0.0);
|
||||||
if (fOwner)
|
ConvertToScreen(&offset);
|
||||||
fOwner->ConvertToScreen(rect);
|
rect->OffsetBy(offset);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
do_owner_check_no_pick();
|
|
||||||
|
|
||||||
ConvertToParent(rect);
|
|
||||||
fParent->ConvertToScreen(rect);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -766,17 +758,9 @@ BView::ConvertToScreen(BRect rect) const
|
||||||
void
|
void
|
||||||
BView::ConvertFromScreen(BRect *rect) const
|
BView::ConvertFromScreen(BRect *rect) const
|
||||||
{
|
{
|
||||||
if (!fParent) {
|
BPoint offset(0.0, 0.0);
|
||||||
if (fOwner)
|
ConvertFromScreen(&offset);
|
||||||
fOwner->ConvertFromScreen(rect);
|
rect->OffsetBy(offset);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
do_owner_check_no_pick();
|
|
||||||
|
|
||||||
ConvertFromParent(rect);
|
|
||||||
fParent->ConvertFromScreen(rect);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue