aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMarvin Borner2020-09-04 17:09:07 +0200
committerMarvin Borner2020-09-04 17:09:07 +0200
commit6938cb8093dc497160e24d8502cfc42a6adb1a6b (patch)
tree79418b037f1b2ef142a7af9e2a9421b337927f96 /apps
parent538ac0e639ad190fe7dee0fb7029fb536761c471 (diff)
Mandelbrot performance and coloring
Diffstat (limited to 'apps')
-rw-r--r--apps/Makefile5
-rw-r--r--apps/mandelbrot.c5
-rw-r--r--apps/wm.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 44222d9..b753dd5 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -5,10 +5,7 @@ CC = ../cross/opt/bin/i686-elf-gcc
LD = ../cross/opt/bin/i686-elf-ld
OC = ../cross/opt/bin/i686-elf-objcopy
-# Flags to make the binary smaller TODO: Remove after indirect pointer support!
-CSFLAGS = -mpreferred-stack-boundary=2 -fno-asynchronous-unwind-tables -Os
-
-CFLAGS = $(CSFLAGS) -Wall -Wextra -nostdlib -nostdinc -fno-builtin -std=c99 -m32 -pedantic-errors -I../libc/inc/ -I../libgui/inc/ -fPIE -Duserspace
+CFLAGS = -Wall -Wextra -nostdlib -nostdinc -fno-builtin -std=c99 -m32 -pedantic-errors -I../libc/inc/ -I../libgui/inc/ -fPIE -Duserspace -Ofast
all: $(COBJS)
diff --git a/apps/mandelbrot.c b/apps/mandelbrot.c
index 2165217..6eef9ef 100644
--- a/apps/mandelbrot.c
+++ b/apps/mandelbrot.c
@@ -38,9 +38,10 @@ void draw_mandelbrot(struct window *win, int resolution)
}
srand(iteration);
if (iteration < max)
- draw_pixel(win, col, row, rand() | 0xff000000);
+ draw_pixel(win, col, row,
+ rand() << 16 | rand() << 8 | rand() | 0xff000000);
else
- draw_pixel(win, col, row, BG_COLOR);
+ draw_pixel(win, col, row, 0xff000000);
}
}
gui_redraw();
diff --git a/apps/wm.c b/apps/wm.c
index 380884f..477eb7f 100644
--- a/apps/wm.c
+++ b/apps/wm.c
@@ -91,8 +91,8 @@ int main(int argc, char **argv)
switch (msg->type) {
case MSG_NEW_WINDOW:
printf("New window for pid %d\n", msg->src);
- struct window *win = new_window(vbe->width / 2 - 250, vbe->height / 2 - 150,
- 500, 300, (int)msg->data);
+ struct window *win = new_window(vbe->width / 2 - 500, vbe->height / 2 - 400,
+ 1000, 800, (int)msg->data);
msg_send(msg->src, MSG_NEW_WINDOW, win);
list_add(windows, win);
focused = win;