You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a view is already scheduled to be repainted, any additional calls to scheduleRepaint() will be ignored. This causes this code sequence behave unexpected:
textlbl.setText("My new text");
bgView.scheduleRepaint();
textLbl.scheduleRepaint();
The first setText command will insert the TextLabelView into the dirty queue to schedule repaint in the future. When scheduleRepaint is called on the background view (bgView), this view is appended to the queue. The last call to textLbl have no effect, since the display system ignores it.
Solution
scheduleRepaint should not ignore the request if the view already exists in the dirty queue. It should instead move the view to the end of the queue. This will ensure the view painted as the last, thereby rendering it visible.
The text was updated successfully, but these errors were encountered:
stoffera
changed the title
scheduleRepaint must re-arrange dirty queue to realize painters algorithm
Repaints must re-arrange dirty queue to realize painters algorithm
Aug 29, 2017
If a view is already scheduled to be repainted, any additional calls to
scheduleRepaint()
will be ignored. This causes this code sequence behave unexpected:textlbl.setText("My new text"); bgView.scheduleRepaint(); textLbl.scheduleRepaint();
The first
setText
command will insert theTextLabelView
into the dirty queue to schedule repaint in the future. WhenscheduleRepaint
is called on the background view (bgView
), this view is appended to the queue. The last call totextLbl
have no effect, since the display system ignores it.Solution
scheduleRepaint
should not ignore the request if the view already exists in the dirty queue. It should instead move the view to the end of the queue. This will ensure the view painted as the last, thereby rendering it visible.The text was updated successfully, but these errors were encountered: