summaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-02-03 22:04:16 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-02-03 22:04:16 +0100
commit89c56ce0148ea63293e720f7532d78954ae9f4dc (patch)
tree3983a06379987acb8e9ef5c968e1c2dbf7c4ab3e /minui
parentMerge "Fix a log issue in ui.cpp." am: 7f38fbf976 am: c33d037d7d am: 2be767eba4 (diff)
parentMerge "minui: Minor clean up to graphics.cpp." am: b04bc0540d am: ec8d74580d (diff)
downloadandroid_bootable_recovery-89c56ce0148ea63293e720f7532d78954ae9f4dc.tar
android_bootable_recovery-89c56ce0148ea63293e720f7532d78954ae9f4dc.tar.gz
android_bootable_recovery-89c56ce0148ea63293e720f7532d78954ae9f4dc.tar.bz2
android_bootable_recovery-89c56ce0148ea63293e720f7532d78954ae9f4dc.tar.lz
android_bootable_recovery-89c56ce0148ea63293e720f7532d78954ae9f4dc.tar.xz
android_bootable_recovery-89c56ce0148ea63293e720f7532d78954ae9f4dc.tar.zst
android_bootable_recovery-89c56ce0148ea63293e720f7532d78954ae9f4dc.zip
Diffstat (limited to 'minui')
-rw-r--r--minui/graphics.cpp63
1 files changed, 1 insertions, 62 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp
index 3b3bb65b5..41e24f13f 100644
--- a/minui/graphics.cpp
+++ b/minui/graphics.cpp
@@ -16,21 +16,9 @@
#include "graphics.h"
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-
-#include <fcntl.h>
-#include <stdio.h>
-
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-
-#include <linux/fb.h>
-#include <linux/kd.h>
-
-#include <time.h>
#include "font_10x18.h"
#include "minui/minui.h"
@@ -319,55 +307,6 @@ static void gr_init_font(void)
gr_font->char_height = font.char_height;
}
-#if 0
-// Exercises many of the gr_*() functions; useful for testing.
-static void gr_test() {
- GRSurface** images;
- int frames;
- int result = res_create_multi_surface("icon_installing", &frames, &images);
- if (result < 0) {
- printf("create surface %d\n", result);
- gr_exit();
- return;
- }
-
- time_t start = time(NULL);
- int x;
- for (x = 0; x <= 1200; ++x) {
- if (x < 400) {
- gr_color(0, 0, 0, 255);
- } else {
- gr_color(0, (x-400)%128, 0, 255);
- }
- gr_clear();
-
- gr_color(255, 0, 0, 255);
- GRSurface* frame = images[x%frames];
- gr_blit(frame, 0, 0, frame->width, frame->height, x, 0);
-
- gr_color(255, 0, 0, 128);
- gr_fill(400, 150, 600, 350);
-
- gr_color(255, 255, 255, 255);
- gr_text(500, 225, "hello, world!", 0);
- gr_color(255, 255, 0, 128);
- gr_text(300+x, 275, "pack my box with five dozen liquor jugs", 1);
-
- gr_color(0, 0, 255, 128);
- gr_fill(gr_draw->width - 200 - x, 300, gr_draw->width - x, 500);
-
- gr_draw = gr_backend->flip(gr_backend);
- }
- printf("getting end time\n");
- time_t end = time(NULL);
- printf("got end time\n");
- printf("start %ld end %ld\n", (long)start, (long)end);
- if (end > start) {
- printf("%.2f fps\n", ((double)x) / (end-start));
- }
-}
-#endif
-
void gr_flip() {
gr_draw = gr_backend->flip(gr_backend);
}