From owner-p4-projects@FreeBSD.ORG Tue Dec 4 22:53:26 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B6D34288; Tue, 4 Dec 2012 22:53:26 +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 72A63286 for ; Tue, 4 Dec 2012 22:53:26 +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 582938FC19 for ; Tue, 4 Dec 2012 22:53:26 +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 qB4MrQRE031982 for ; Tue, 4 Dec 2012 22:53:26 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.5/8.14.5/Submit) id qB4MrQE1031979 for perforce@freebsd.org; Tue, 4 Dec 2012 22:53:26 GMT (envelope-from brooks@freebsd.org) Date: Tue, 4 Dec 2012 22:53:26 GMT Message-Id: <201212042253.qB4MrQE1031979@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 219880 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: Tue, 04 Dec 2012 22:53:27 -0000 http://p4web.freebsd.org/@@219880?ac=10 Change 219880 by brooks@brooks_zenith on 2012/12/04 22:52:29 Always center and left extend under-width title slides. Correct the position of the sandbox indicator when the slides aren't left aligned. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#17 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#17 (text+ko) ==== @@ -443,7 +443,7 @@ render_cover(int dfd, const char *cover) { int pfd; - uint32_t r; + uint32_t r, fcol; struct iboxstate *is; busy(1); @@ -461,24 +461,25 @@ warnx("png_read_finish() failed for %s", cover); return (-1); } + fcol = slide_fcol + ((slide_width - is->width) / 2); fb_fill_region(white, 0, 0, fb_width, fb_height); - fb_post_region(__DEVOLATILE(uint32_t *, is->buffer), slide_fcol, 0, + fb_post_region(__DEVOLATILE(uint32_t *, is->buffer), fcol, 0, is->width, is->height); - if (slide_fcol > 0) { + if (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); + 0, r, 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], - slide_fcol + is->width, r, - fb_width - (slide_fcol + is->width), 1); + fcol + is->width, r, + fb_width - (fcol + is->width), 1); } if (sb_vis && sb != SB_NONE) - fb_rectangle(red, 2, 0, 0, is->width, is->height); + fb_rectangle(red, 2, fcol, 0, is->width, is->height); iboxstate_free(is); unbusy();