diff options
author | Tom Rini <trini@konsulko.com> | 2025-05-02 13:57:26 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-05-02 13:57:26 -0600 |
commit | 6cc812f8cc55c132458c7da5b9fb7666315cbe8c (patch) | |
tree | 297fb9e724f252a3fdb46ee28348e66ff7c05a96 /boot/scene.c | |
parent | 4ca87fd18c1b718be423755939a6e5b1688869f5 (diff) | |
parent | 7703cfe025cbbb2277498483304b4db958521d9e (diff) |
Merge patch series "video: Enhancements related to truetype and console"
Simon Glass <sjg@chromium.org> says:
This series includes some precursor patches needed for forthcoming expo
enhancements.
- truetype support for multiple lines
- make white-on-black a runtime option
- support drawing a rectangle
Diffstat (limited to 'boot/scene.c')
-rw-r--r-- | boot/scene.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/boot/scene.c b/boot/scene.c index 3290a40222a..fb82ffe768c 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -298,7 +298,7 @@ int scene_obj_get_hw(struct scene *scn, uint id, int *widthp) } ret = vidconsole_measure(scn->expo->cons, txt->font_name, - txt->font_size, str, &bbox); + txt->font_size, str, -1, &bbox, NULL); if (ret) return log_msg_ret("mea", ret); if (widthp) @@ -330,8 +330,9 @@ static void scene_render_background(struct scene_obj *obj, bool box_only) enum colour_idx fore, back; uint inset = theme->menu_inset; + vid_priv = dev_get_uclass_priv(dev); /* draw a background for the object */ - if (CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK)) { + if (vid_priv->white_on_black) { fore = VID_DARK_GREY; back = VID_WHITE; } else { @@ -344,7 +345,6 @@ static void scene_render_background(struct scene_obj *obj, bool box_only) return; vidconsole_push_colour(cons, fore, back, &old); - vid_priv = dev_get_uclass_priv(dev); video_fill_part(dev, label_bbox.x0 - inset, label_bbox.y0 - inset, label_bbox.x1 + inset, label_bbox.y1 + inset, vid_priv->colour_fg); @@ -408,7 +408,8 @@ static int scene_obj_render(struct scene_obj *obj, bool text_mode) struct vidconsole_colour old; enum colour_idx fore, back; - if (CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK)) { + vid_priv = dev_get_uclass_priv(dev); + if (vid_priv->white_on_black) { fore = VID_BLACK; back = VID_WHITE; } else { @@ -416,7 +417,6 @@ static int scene_obj_render(struct scene_obj *obj, bool text_mode) back = VID_BLACK; } - vid_priv = dev_get_uclass_priv(dev); if (obj->flags & SCENEOF_POINT) { vidconsole_push_colour(cons, fore, back, &old); video_fill_part(dev, x - theme->menu_inset, y, |