-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
arrayblit: mark bitmap area as dirty #4430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this. I guess this is now the risk we face with the write_pixel function broken out separately.
One note of caution, if a dirty region’s x1 == x2, this signifies that there is no dirty area. Right now there is no checking inside set_dirty_area to enforce x1 != x2. Is there a possibility that x1 could equal x2 here? If so, it will cause unexpected refresh/dirty rectangle behavior for single column changes.
@kmatch98 if you don't mind, I'd like to leave this possible "inefficiency" for now. From what I can tell, the scenario you outline
If that's correct, a user who is concerned about the loss of efficiency can simply ensure they don't call I would like to make some more far-reaching changes to dirty area handling to unify it (and even save a bit of code space!) but it ended up a bit big and would need more testing... which makes me want to do it as a separate pull request
|
@jepler Maybe I am unclear or am misunderstanding, here goes a scenario where I think it would cause an incorrect dirty rectangle:
To avoid this situation where no pixels are written, when I could be too nitpicking this or could be totally wrong so feel free to let me know what I'm missing. It’s a minor issue overall so if you want to merge I can live with this. And I just looked at your dirty rectangle updates and it looks like those might protect against this kind of weird case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solves the redraw problem observed.
In #4403 (comment), @dglaude reported that the screen wasn't updating. This is due to forgetting to mark the target of the arrayblit operation as "dirty".