[BeOS] nsWidget::Update() is flacky in BeOS

RESOLVED FIXED

Status

Core Graveyard
Widget: BeOS
RESOLVED FIXED
12 years ago
4 years ago

People

(Reporter: Sergei Dolgov, Assigned: Sergei Dolgov)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.29 KB, patch
tqh
: review+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
In lot of situations content don't repaint until you resize window or do some other forcing action.

Problem is ::Update() method which relies on BWindow::UpdateIfNeeded to trigger BView::Draws() which should create non-empty repaint region. Only then OnPaint() is called.

That was done for reducing CPU-consumption at scrolling. But produce annoying results in other cases.

Solutions may be:
1)Use mView->Invalidate() at place of Window()->UpdateIfNeeded
2)Don't call SetViewColor(B_TRANSPARENT_COLOR) in nsViewBeOS constructor.

Comment 1

12 years ago
Shouldn't Mozilla's update be a force to redraw? Sounds like we should do 1).
(Assignee)

Comment 2

12 years ago
It should, but it made BeZilla to do too heavy work, especially at scrolling. As ViewManager (gkview) follows each Widget::Scroll() call with Widget::Update() call.

But with current Scroll() code i tried intermidiate solution - just that 1) - and seems it don't increase CPU load too much. Probably BView's Invalidate() is quite intelligent in this case. And following forced OnPaint() which redraws only dirty region seems sufficient to redraw scroll-button at proper time.

If you noticed situation where page don't redraw and needs resize to be redrawn (usually this happens if page after clicking some submit button still has same name but different content) - i wish you test that 1) version. If it really fixes things on your machine too.
(Assignee)

Comment 3

12 years ago
Created attachment 227055 [details] [diff] [review]
patch

patch. uses less expensive version when scrolling, bit more expensive version in other cases.
r=?
Assignee: nobody → sergei_d
Status: NEW → ASSIGNED
Attachment #227055 - Flags: review?(thesuckiestemail)

Comment 4

12 years ago
Comment on attachment 227055 [details] [diff] [review]
patch

r=thesuckiestemail@yahoo.se
Attachment #227055 - Flags: review?(thesuckiestemail) → review+
(Assignee)

Comment 5

12 years ago
Checking in mozilla/widget/src/beos/nsWindow.cpp;
/cvsroot/mozilla/widget/src/beos/nsWindow.cpp,v  <--  nsWindow.cpp
new revision: 1.128; previous revision: 1.127
done 
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

12 years ago
Regression in scrolling performance on pages with children is too noticeable.

Looks like we should ignore Update() calls for children.

Some patch will follow soon.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 7

12 years ago
Created attachment 227270 [details] [diff] [review]
patch

r=?
Attachment #227055 - Attachment is obsolete: true
Attachment #227270 - Flags: review?(thesuckiestemail)

Comment 8

12 years ago
Comment on attachment 227270 [details] [diff] [review]
patch

r=thesuckiestemail@yahoo.se
Ok, but I thinks the comments are rather unneccessary. It's not hard to read that code, you only add to the amount to read.
Attachment #227270 - Flags: review?(thesuckiestemail) → review+
(Assignee)

Comment 9

12 years ago
Checking in mozilla/widget/src/beos/nsWindow.cpp;
/cvsroot/mozilla/widget/src/beos/nsWindow.cpp,v  <--  nsWindow.cpp
new revision: 1.129; previous revision: 1.128
done 
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.