lib: Export calculate_logo_coordinates for external use
Expose calculate_logo_coordinates() by moving its declaration to bootsplash.h and removing the static qualifier in render_bmp.c. This allows other parts of the codebase, such as the upcoming text rendering logic, to reuse the existing logo positioning math to calculate destination coordinates based on alignment settings. Change-Id: I8f8b767b093d6bc2befefdc55fe2effa38b95752 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91154 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
96b29e37db
commit
5aeda3e7bb
2 changed files with 10 additions and 1 deletions
|
|
@ -141,6 +141,15 @@ struct logo_config {
|
|||
uint8_t logo_bottom_margin;
|
||||
};
|
||||
|
||||
/*
|
||||
* Calculates the destination coordinates for the logo based on both horizontal and
|
||||
* vertical alignment settings.
|
||||
*/
|
||||
struct logo_coordinates calculate_logo_coordinates(
|
||||
uint32_t horizontal_resolution, uint32_t vertical_resolution,
|
||||
uint32_t logo_width, uint32_t logo_height,
|
||||
enum fw_splash_horizontal_alignment halignment,
|
||||
enum fw_splash_vertical_alignment valignment);
|
||||
void render_logo_to_framebuffer(struct logo_config *config);
|
||||
void load_and_convert_bmp_to_blt(uintptr_t *logo, size_t *logo_size,
|
||||
uintptr_t *blt, size_t *blt_size, uint32_t *pixel_height, uint32_t *pixel_width,
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ void convert_bmp_to_blt(uintptr_t logo, size_t logo_size,
|
|||
* Returning `struct logo_coordinates` that contains the calculated x and y coordinates
|
||||
* for rendering the logo.
|
||||
*/
|
||||
static struct logo_coordinates calculate_logo_coordinates(
|
||||
struct logo_coordinates calculate_logo_coordinates(
|
||||
uint32_t horizontal_resolution, uint32_t vertical_resolution,
|
||||
uint32_t logo_width, uint32_t logo_height,
|
||||
enum fw_splash_horizontal_alignment halignment,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue