From 8acf4e2237c2969647f47008344e44918bb30acb Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Tue, 21 Dec 2010 07:14:17 -0800 Subject: Pass bits per pixel tu UI when it gets attached to core framebuffer Instead of passing bits per pixel property in each and every framebuffer notification message, do it once when UI attaches to the core's framebuffer service. Change-Id: Ic1f6d9796b64d40518f09f5a5341f8359ff817b7 --- android/console.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'android/console.c') diff --git a/android/console.c b/android/console.c index 398218a..a89d0e1 100644 --- a/android/console.c +++ b/android/console.c @@ -2518,10 +2518,14 @@ do_create_framebuffer_service( ControlClient client, char* args ) return -1; } - core_fb = corefb_create(client->sock, protocol); + core_fb = corefb_create(client->sock, protocol, coredisplay_get_framebuffer()); if (!coredisplay_attach_fb_service(core_fb)) { + char reply_buf[4096]; framebuffer_client = client; - control_write( client, "OK\r\n"); + // Reply "OK" with the framebuffer's bits per pixel + snprintf(reply_buf, sizeof(reply_buf), "OK: -bitsperpixel=%d\r\n", + corefb_get_bits_per_pixel(core_fb)); + control_write( client, reply_buf); } else { control_write( client, "KO\r\n" ); control_client_destroy(client); -- cgit v1.1