diff options
| author | Dan McDonald <danmcd@joyent.com> | 2021-05-19 15:15:30 -0400 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2021-05-19 15:15:30 -0400 |
| commit | 58a2b7ba9771c57f897a33cf69335cd18fa5992f (patch) | |
| tree | 6f8f4c28a4a5e297c32c6d376297208481841e6d | |
| parent | 60df1a621153f7e90e22bfcf857dfaf37facd1f5 (diff) | |
| parent | d50863a3386bcb8b803fae99c4a1ef2fb668b618 (diff) | |
| download | illumos-joyent-release-20210520.tar.gz | |
[illumos-gate merge]release-20210520
commit d50863a3386bcb8b803fae99c4a1ef2fb668b618
13791 loader: gfx_fb_drawrect should use GfxFbBltVideoFill
| -rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/common/gfx_fb.c | 23 |
2 files changed, 14 insertions, 11 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index 30c6982235..e8dcc2dd0b 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -34,4 +34,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2021.05.12.1 +BOOT_VERSION = $(LOADER_VERSION)-2021.05.16.1 diff --git a/usr/src/boot/sys/boot/common/gfx_fb.c b/usr/src/boot/sys/boot/common/gfx_fb.c index 09875a85f1..1e54a73630 100644 --- a/usr/src/boot/sys/boot/common/gfx_fb.c +++ b/usr/src/boot/sys/boot/common/gfx_fb.c @@ -1233,25 +1233,28 @@ gfx_fb_setpixel(uint32_t x, uint32_t y) /* * draw rectangle in framebuffer using gfx coordinates. - * The function is borrowed from fbsd vt_fb.c */ void gfx_fb_drawrect(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t fill) { - uint32_t x, y; + uint32_t c; + text_color_t fg, bg; if (plat_stdout_is_framebuffer() == 0) return; - for (y = y1; y <= y2; y++) { - if (fill || (y == y1) || (y == y2)) { - for (x = x1; x <= x2; x++) - gfx_fb_setpixel(x, y); - } else { - gfx_fb_setpixel(x1, y); - gfx_fb_setpixel(x2, y); - } + tem_get_colors((tem_vt_state_t)tems.ts_active, &fg, &bg); + c = gfx_fb_color_map(fg); + + if (fill != 0) { + gfxfb_blt(&c, GfxFbBltVideoFill, 0, 0, x1, y1, x2 - x1, + y2 - y1, 0); + } else { + gfxfb_blt(&c, GfxFbBltVideoFill, 0, 0, x1, y1, x2 - x1, 1, 0); + gfxfb_blt(&c, GfxFbBltVideoFill, 0, 0, x1, y2, x2 - x1, 1, 0); + gfxfb_blt(&c, GfxFbBltVideoFill, 0, 0, x1, y1, 1, y2 - y1, 0); + gfxfb_blt(&c, GfxFbBltVideoFill, 0, 0, x2, y1, 1, y2 - y1, 0); } } |
