mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 09:32:33 +03:00
[fbcon] Centre background picture on console
Centre the background picture on the console, to give a more consistent result when the aspect ratio does not match the requested width and height. Once drawn for the first time, nothing should ever overwrite the margins of the display. We can therefore eliminate the logic used to redraw only the margin areas, and use much simpler code to draw the complete initial background image. Simplify the redrawing logic further by making the background picture buffer equal in size to the frame buffer. In the common case of a background picture which is designed to fill the screen, this wastes no extra memory, and the combined code simplifications reduce the size of fbcon.o by approximately 15%. Redefine the concept of "margin" to match the intuitive definition (i.e. the size of the gap, rather than the position of the boundary line). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -103,14 +103,6 @@ struct fbcon_text {
|
||||
struct fbcon_picture {
|
||||
/** Start address */
|
||||
userptr_t start;
|
||||
/** Pixel geometry */
|
||||
struct fbcon_geometry pixel;
|
||||
/** Character geometry */
|
||||
struct fbcon_geometry character;
|
||||
/** Margin */
|
||||
struct fbcon_margin margin;
|
||||
/** Indent to first character (in bytes) */
|
||||
size_t indent;
|
||||
};
|
||||
|
||||
/** A frame buffer console */
|
||||
|
||||
Reference in New Issue
Block a user