Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repaints must re-arrange dirty queue to realize painters algorithm #27

Open
stoffera opened this issue Aug 29, 2017 · 0 comments
Open
Assignees
Labels
Milestone

Comments

@stoffera
Copy link
Contributor

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.

@stoffera stoffera added the bug label Aug 29, 2017
@stoffera stoffera added this to the 2.0 milestone Aug 29, 2017
@stoffera stoffera self-assigned this Aug 29, 2017
@stoffera 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant