Commit Graph

19 Commits

Author SHA1 Message Date
Andreas Kling
9126d08a43 Terminal: Avoid dirtying lines when clearing them has no visual effect. 2019-02-04 08:53:53 +01:00
Andreas Kling
dddd0e7b03 Get nyancat nyanning in Serenity.
I found a cute program that renders an animated nyancat in the terminal.
This patch adds enough hackery to get it working correctly. :^)
2019-02-03 16:11:28 +01:00
Andreas Kling
3944c00f23 Terminal: Add limited support for 'M' escape sequence (delete line.) 2019-02-03 14:00:48 +01:00
Andreas Kling
f176af7cd1 Terminal: Implement 'J' escape "clear from cursor to end of screen." 2019-01-30 21:04:49 +01:00
Andreas Kling
7cf3c7461c Refactor GUI rendering model to be two-phased.
Instead of clients painting whenever they feel like it, we now ask that they
paint in response to a paint message.

After finishing painting, clients notify the WindowServer about the rect(s)
they painted into and then flush eventually happens, etc.

This stuff leaves us with a lot of badly named things. Need to fix that.
2019-01-26 05:20:32 +01:00
Andreas Kling
5adaeeaa3b Terminal: Support setting the window title using Xterm escape sequences.
Use this in the /bin/sh prompt to keep the window title in sync with the
shell's working directory. :^)
2019-01-25 05:52:16 +01:00
Andreas Kling
267a903dd0 Terminal: Redraw entire line if any of its characters are dirty.
This means we only have to do one fill_rect() per line and the whole process
ends up being ~10% faster than before.

Also added a read_tsc() syscall to give userspace access to the TSC.
2019-01-25 02:09:29 +01:00
Andreas Kling
a4a106a430 Terminal: Use a more reasonable data structure for the emulation buffer. 2019-01-25 01:27:02 +01:00
Andreas Kling
faaa0dbf1d Terminal: Various improvements to terminal emulation. 2019-01-23 19:59:17 +01:00
Andreas Kling
9ae20a153e Terminal: Add support for some more escape sequences. 2019-01-23 08:55:59 +01:00
Andreas Kling
3271c115e2 WindowServer: Only blit dirty rect of windows to back buffer.
Previously we'd blit every pixel in every window that intersected any dirty
rect to the back buffer. With this patch, we limit ourselves to blitting the
pixels inside the actual dirty rects.

There's still a lot of optimizations to make in this code.
2019-01-20 23:42:36 +01:00
Andreas Kling
7e5b81fe48 Make a SharedGraphics directory for classes shared between Kernel and LibGUI. 2019-01-19 23:22:46 +01:00
Andreas Kling
dff70021ab Make it possible to invalidate only a portion of a window.
Use this in Terminal to only invalidate rows where anything changed.
2019-01-18 04:37:49 +01:00
Andreas Kling
dad58db757 Add WindowActivated and WindowDeactivated events.
Use this to implement different looking Terminal cursors depending on
the window active state.
2019-01-17 17:38:04 +01:00
Andreas Kling
5983a217c3 Terminal: Draw the terminal cursor. 2019-01-17 16:19:49 +01:00
Andreas Kling
d0137f0e96 Terminal: optimize repaints a bunch.
We track dirty character cells + pending whole-terminal scrolls.
This drastically reduces the number of pixels pushed.
2019-01-15 10:23:15 +01:00
Andreas Kling
d14ec951ea Terminal: Add some inset and line spacing.
This is starting to feel vaguely usable! :^)
2019-01-15 07:39:51 +01:00
Andreas Kling
c24f543a57 Terminal: basic ANSI color support. 2019-01-15 07:30:24 +01:00
Andreas Kling
6d8043767e Start working on a graphical Terminal program. 2019-01-15 04:30:55 +01:00