diff options
author | Doug Zongker <dougz@android.com> | 2010-11-01 10:19:12 -0700 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2010-11-01 10:19:12 -0700 |
commit | 51266d1397309978eac9b2e96035582454f0321b (patch) | |
tree | 896aac2b54a16c36c198d3cc58c2f48d77ca75b3 /minui/graphics.c | |
parent | 2c3539e4d8251ad91e0b881253d39583680093e8 (diff) | |
download | bootable_recovery-51266d1397309978eac9b2e96035582454f0321b.zip bootable_recovery-51266d1397309978eac9b2e96035582454f0321b.tar.gz bootable_recovery-51266d1397309978eac9b2e96035582454f0321b.tar.bz2 |
clear recovery framebuffers on allocation; display icon right after ui_init
Make ui_init() clear the framebuffer memory it maps in so the user
isn't treated to a visible flash of random bits on recovery startup.
Call ui_set_background() (to show the installing icon) right after
ui_init() to display something while device_recovery_start() is
working (which can take a second or two on some devices).
Bug: 3145331
Change-Id: I11e7859fab5847370ea4f4932c3fb1558af26c5d
Diffstat (limited to 'minui/graphics.c')
-rw-r--r-- | minui/graphics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/minui/graphics.c b/minui/graphics.c index adbfc09..4127c40 100644 --- a/minui/graphics.c +++ b/minui/graphics.c @@ -88,6 +88,7 @@ static int get_framebuffer(GGLSurface *fb) fb->stride = vi.xres; fb->data = bits; fb->format = GGL_PIXEL_FORMAT_RGB_565; + memset(fb->data, 0, vi.yres * vi.xres * 2); fb++; @@ -97,6 +98,7 @@ static int get_framebuffer(GGLSurface *fb) fb->stride = vi.xres; fb->data = (void*) (((unsigned) bits) + vi.yres * vi.xres * 2); fb->format = GGL_PIXEL_FORMAT_RGB_565; + memset(fb->data, 0, vi.yres * vi.xres * 2); return fd; } @@ -277,7 +279,6 @@ int gr_init(void) set_active_framebuffer(0); gl->colorBuffer(gl, &gr_mem_surface); - gl->activeTexture(gl, 0); gl->enable(gl, GGL_BLEND); gl->blendFunc(gl, GGL_SRC_ALPHA, GGL_ONE_MINUS_SRC_ALPHA); |