mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 19:00:27 +00:00
[metal] Reduce size of "screen of death" code
This commit is contained in:
parent
01ca4af2f9
commit
e8ef939274
3 changed files with 7 additions and 2 deletions
|
@ -37,6 +37,7 @@
|
|||
*/
|
||||
|
||||
#undef KLOGTTY
|
||||
#define MAYUNROLLLOOPS unrollloops
|
||||
|
||||
#define COLOR TtyCanvasColor
|
||||
#define BPP 32
|
||||
|
|
|
@ -258,8 +258,9 @@ static void DRAWBITMAP(struct Tty *tty, size_t gy, size_t gx,
|
|||
DIRTY(tty, gy, gx, gy + bm_ht, gx + bm_wid);
|
||||
}
|
||||
|
||||
static unrollloops void FILLRECT(struct Tty *tty, size_t gy, size_t gx,
|
||||
size_t fill_ht, size_t fill_wid, COLOR bg) {
|
||||
static MAYUNROLLLOOPS void FILLRECT(struct Tty *tty, size_t gy, size_t gx,
|
||||
size_t fill_ht, size_t fill_wid,
|
||||
COLOR bg) {
|
||||
size_t xs = tty->xs;
|
||||
char *cplotter = tty->canvas + gy * xs + gx * sizeof(COLOR);
|
||||
size_t yleft = fill_ht, xleft;
|
||||
|
|
|
@ -37,7 +37,10 @@
|
|||
* @see libc/vga/tty-graph.inc
|
||||
*/
|
||||
|
||||
#pragma GCC optimize("s")
|
||||
|
||||
#define KLOGTTY
|
||||
#define MAYUNROLLLOOPS /* do not unroll loops; keep the code small! */
|
||||
|
||||
/* Instantiate output routines for 16-bit pixel formats. */
|
||||
#define COLOR uint16_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue