1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:57:46 +00:00

Make it possible to invalidate only a portion of a window.

Use this in Terminal to only invalidate rows where anything changed.
This commit is contained in:
Andreas Kling 2019-01-18 04:37:49 +01:00
parent 9d7da26b4e
commit dff70021ab
15 changed files with 91 additions and 15 deletions

View file

@ -43,7 +43,7 @@ int main(int argc, char** argv)
paint(*bitmap, backing.size.width, backing.size.height);
rc = gui_invalidate_window(window_id);
rc = gui_invalidate_window(window_id, nullptr);
if (rc < 0) {
perror("gui_invalidate_window");
return 1;
@ -69,7 +69,7 @@ int main(int argc, char** argv)
if (event.type == GUI_Event::Type::MouseDown) {
paint(*bitmap, backing.size.width, backing.size.height);
gui_invalidate_window(window_id);
gui_invalidate_window(window_id, nullptr);
}
}