From owner-p4-projects@FreeBSD.ORG Wed Nov 28 20:42:59 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C0F5CE4F; Wed, 28 Nov 2012 20:42:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 331A1E4D for ; Wed, 28 Nov 2012 20:42:59 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 1779B8FC13 for ; Wed, 28 Nov 2012 20:42:59 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.5/8.14.5) with ESMTP id qASKgwbo086382 for ; Wed, 28 Nov 2012 20:42:58 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.5/8.14.5/Submit) id qASKgw3J086379 for perforce@freebsd.org; Wed, 28 Nov 2012 20:42:58 GMT (envelope-from brooks@freebsd.org) Date: Wed, 28 Nov 2012 20:42:58 GMT Message-Id: <201211282042.qASKgw3J086379@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 219860 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2012 20:43:00 -0000 http://p4web.freebsd.org/@@219860?ac=10 Change 219860 by brooks@brooks_zenith on 2012/11/28 20:42:47 Correct a number of cosmetic issues reported by rwatson and a few others I found along the way: - Align the busy indicator at the left edge of the area displayed on the hdmi/vga out rather than the lefts of the touch screen. - Similarly align the cover slide to the left of the projected area and left extend the left most pixel to fill the space. - Display the full text of the 640x480 (Centered) option name. - Since Visible is a toggle use an X rather than a * to indicate selection. - Start numbering slides from 2 if there is a cover slide. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#14 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#14 (text+ko) ==== @@ -125,12 +125,12 @@ */ for (r = 0; r < ICON_WH; r++) for(c = 0; c < ICON_WH; c++) - if (pfbp[r * fb_width + c] != + if (pfbp[slide_fcol + r * fb_width + c] != hourglass[r * ICON_WH + c]) busyarea[r * ICON_WH + c] = - pfbp[r * fb_width + c]; + pfbp[slide_fcol + r * fb_width + c]; /* Draw the hourglass */ - fb_post_region(hourglass, 0, 0, ICON_WH, ICON_WH); + fb_post_region(hourglass, slide_fcol, 0, ICON_WH, ICON_WH); } static void @@ -145,7 +145,7 @@ for(c = 0; c < ICON_WH; c++) if (busyarea[r * ICON_WH + c] != hourglass[r * ICON_WH + c]) - pfbp[r * fb_width + c] = + pfbp[slide_fcol + r * fb_width + c] = busyarea[r * ICON_WH + c]; } @@ -183,7 +183,7 @@ * [*] None [ ] 800x480 * [ ] Capsicum [*] 720x480 * [ ] CHERI [ ] 640x480 (Left) - * [ ] 640x480 (Center) + * [ ] 640x480 (Centered) * [ ] Visible * */ @@ -192,7 +192,7 @@ #define CD_TEXT_ROWS 6 #define CD_SB_COLS 12 #define CD_GAP 16 -#define CD_RES_COLS 20 +#define CD_RES_COLS 22 static int config_dialog(void) { @@ -278,7 +278,7 @@ textbuf, f_width * CD_SB_COLS, f_height); fb_fill_buf(textbuf, white, f_width * CD_SB_COLS, f_height); - sprintf(text, "[%c] Visible", sb_vis ? '*' : ' '); + sprintf(text, "[%c] Visible", sb_vis ? 'X' : ' '); fb_render_text(text, 2, black, white, textbuf, f_width * CD_SB_COLS, f_height); fb_composite(dbuf, d_width, d_height, @@ -465,13 +465,20 @@ return (-1); } fb_fill_region(white, 0, 0, fb_width, fb_height); - fb_post_region(__DEVOLATILE(uint32_t *, is->buffer), 0, 0, + fb_post_region(__DEVOLATILE(uint32_t *, is->buffer), slide_fcol, 0, is->width, is->height); + if (slide_fcol > 0) { + /* Left extend the image if needed */ + for (r = 0; r < is->height; r++) + fb_fill_region(is->buffer[r * is->width], + 0, r, slide_fcol, 1); + } if (is->width < (uint)fb_width) { /* Right extend the image if needed */ for (r = 0; r < is->height; r++) fb_fill_region(is->buffer[((r + 1) * is->width) - 1], - is->width, r, fb_width - is->width, 1); + slide_fcol + is->width, r, + fb_width - (slide_fcol + is->width), 1); } if (sb_vis && sb != SB_NONE) fb_rectangle(red, 2, 0, 0, is->width, is->height); @@ -623,7 +630,8 @@ fb_render_text(sntext, 1, black, white, snimage, f_width * strlen(sntext), f_height); fb_post_region(snimage, - (slide_width / 2) - (f_width * strlen(sntext) / 2), + slide_fcol + (slide_width / 2) - + (f_width * strlen(sntext) / 2), fb_height - f_height, f_width * strlen(sntext), f_height); free(snimage); @@ -908,7 +916,8 @@ render_cover(dirfd(dirp), covers[cover]); *slidep = slide; /* Update post success */ } else { - error = render_slide(dirfd(dirp), slide, + error = render_slide(dirfd(dirp), + slide + (ncovers > 0 ? 1 : 0), slides[slide - 1]); if (error == 0) *slidep = slide; /* Update post success */