PERFORCE change 219860 for review
Brooks Davis
brooks at FreeBSD.org
Wed Nov 28 20:43:00 UTC 2012
http://p4web.freebsd.org/@@219860?ac=10
Change 219860 by brooks at 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 */
More information about the p4-projects
mailing list