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>tags/v1.20.1
|
|
||
98 |
|
98 |
|
99 |
|
99 |
|
100 |
|
100 |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
|
|
|
126 |
|
|
101 |
|
127 |
|
102 |
|
128 |
|
103 |
|
129 |
|
|
|
||
106 |
|
132 |
|
107 |
|
133 |
|
108 |
|
134 |
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
|
135 |
|
|
|
136 |
|
|
112 |
|
137 |
|
113 |
|
138 |
|
114 |
|
139 |
|
|
|
||
125 |
|
150 |
|
126 |
|
151 |
|
127 |
|
152 |
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
|
153 |
|
|
|
154 |
|
|
132 |
|
155 |
|
133 |
|
|
|
134 |
|
|
|
135 |
|
|
|
136 |
|
156 |
|
137 |
|
157 |
|
138 |
|
158 |
|
|
|
||
154 |
|
174 |
|
155 |
|
175 |
|
156 |
|
176 |
|
157 |
|
|
|
158 |
|
|
|
159 |
|
|
|
160 |
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
|
|
|
169 |
|
|
|
170 |
|
|
|
171 |
|
|
|
172 |
|
177 |
|
173 |
|
178 |
|
174 |
|
179 |
|
175 |
|
180 |
|
176 |
|
181 |
|
177 |
|
182 |
|
178 |
|
|
|
179 |
|
|
|
180 |
|
|
|
|
183 |
|
|
|
184 |
|
|
|
185 |
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
|
|
181 |
|
194 |
|
182 |
|
195 |
|
183 |
|
196 |
|
|
|
||
194 |
|
207 |
|
195 |
|
208 |
|
196 |
|
209 |
|
197 |
|
|
|
198 |
|
210 |
|
199 |
|
211 |
|
200 |
|
212 |
|
201 |
|
213 |
|
202 |
|
|
|
|
214 |
|
|
203 |
|
215 |
|
204 |
|
216 |
|
205 |
|
217 |
|
206 |
|
|
|
207 |
|
|
|
208 |
|
|
|
209 |
|
|
|
210 |
|
|
|
211 |
|
|
|
212 |
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
|
|
216 |
|
|
|
217 |
|
|
|
218 |
|
|
|
219 |
|
|
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
|
223 |
|
|
|
224 |
|
|
|
225 |
|
|
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
|
229 |
|
|
|
230 |
|
|
|
231 |
|
|
|
232 |
|
|
|
233 |
|
|
|
234 |
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
|
243 |
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
|
|
218 |
|
|
254 |
|
219 |
|
255 |
|
220 |
|
256 |
|
221 |
|
|
|
||
261 |
|
226 |
|
262 |
|
227 |
|
263 |
|
228 |
|
264 |
|
|
|
|
229 |
|
|
265 |
|
230 |
|
266 |
|
231 |
|
267 |
|
232 |
|
268 |
|
233 |
|
269 |
|
234 |
|
270 |
|
|
|
271 |
|
|
|
272 |
|
|
|
273 |
|
|
|
274 |
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
|
|
|
278 |
|
|
|
279 |
|
|
|
280 |
|
|
|
281 |
|
|
|
282 |
|
|
|
283 |
|
|
|
284 |
|
|
|
285 |
|
|
|
286 |
|
|
|
287 |
|
|
|
288 |
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
|
310 |
|
|
|
311 |
|
|
|
312 |
|
|
|
313 |
|
235 |
|
314 |
|
236 |
|
315 |
|
237 |
|
|
|
||
329 |
|
251 |
|
330 |
|
252 |
|
331 |
|
253 |
|
|
254 |
|
|
|
255 |
|
|
|
256 |
|
|
332 |
|
257 |
|
333 |
|
258 |
|
334 |
|
259 |
|
|
|
||
349 |
|
274 |
|
350 |
|
275 |
|
351 |
|
276 |
|
352 |
|
|
|
|
277 |
|
|
353 |
|
278 |
|
354 |
|
279 |
|
355 |
|
280 |
|
|
|
||
391 |
|
316 |
|
392 |
|
317 |
|
393 |
|
318 |
|
394 |
|
|
|
|
319 |
|
|
395 |
|
320 |
|
396 |
|
321 |
|
|
322 |
|
|
|
323 |
|
|
|
324 |
|
|
397 |
|
325 |
|
398 |
|
326 |
|
399 |
|
327 |
|
|
|
||
541 |
|
469 |
|
542 |
|
470 |
|
543 |
|
471 |
|
544 |
|
|
|
545 |
|
|
|
|
472 |
|
|
|
473 |
|
|
546 |
|
474 |
|
547 |
|
475 |
|
548 |
|
476 |
|
|
|
||
561 |
|
489 |
|
562 |
|
490 |
|
563 |
|
491 |
|
564 |
|
|
|
565 |
|
|
|
566 |
|
|
|
567 |
|
|
|
568 |
|
|
|
569 |
|
|
|
570 |
|
|
|
571 |
|
|
|
572 |
|
|
|
573 |
|
|
|
574 |
|
|
|
575 |
|
|
|
576 |
|
|
|
577 |
|
|
|
578 |
|
|
|
579 |
|
|
|
580 |
|
|
|
581 |
|
|
|
582 |
|
|
|
583 |
|
|
|
584 |
|
|
|
585 |
|
|
|
586 |
|
|
|
587 |
|
|
|
588 |
|
|
|
589 |
|
|
|
590 |
|
|
|
591 |
|
|
|
592 |
|
|
|
593 |
|
|
|
594 |
|
|
|
595 |
|
|
|
596 |
|
|
|
597 |
|
|
|
598 |
|
|
|
599 |
|
|
|
600 |
|
|
|
601 |
|
|
|
602 |
|
|
|
603 |
|
|
|
604 |
|
|
|
605 |
|
|
|
606 |
|
|
|
607 |
|
|
|
608 |
|
|
|
609 |
|
|
|
610 |
|
|
|
611 |
|
|
|
612 |
|
|
|
613 |
|
|
|
614 |
|
|
|
615 |
|
|
|
616 |
|
|
|
617 |
|
|
|
618 |
|
|
|
619 |
|
|
|
620 |
|
|
|
621 |
|
|
|
622 |
|
|
|
623 |
|
|
|
624 |
|
|
|
625 |
|
|
|
626 |
|
|
|
627 |
|
|
|
628 |
|
|
|
629 |
|
|
|
630 |
|
492 |
|
631 |
|
493 |
|
632 |
|
494 |
|
|
|
||
636 |
|
498 |
|
637 |
|
499 |
|
638 |
|
500 |
|
|
501 |
|
|
639 |
|
502 |
|
640 |
|
|
|
641 |
|
503 |
|
|
504 |
|
|
|
505 |
|
|
|
506 |
|
|
642 |
|
507 |
|
643 |
|
508 |
|
644 |
|
509 |
|
645 |
|
510 |
|
646 |
|
511 |
|
647 |
|
512 |
|
|
513 |
|
|
|
514 |
|
|
|
515 |
|
|
|
516 |
|
|
648 |
|
517 |
|
649 |
|
518 |
|
650 |
|
|
|
651 |
|
|
|
652 |
|
|
|
653 |
|
|
|
654 |
|
|
|
655 |
|
|
|
656 |
|
|
|
657 |
|
|
|
658 |
|
|
|
659 |
|
|
|
660 |
|
|
|
661 |
|
|
|
662 |
|
|
|
663 |
|
|
|
664 |
|
|
|
665 |
|
|
|
666 |
|
|
|
667 |
|
|
|
668 |
|
|
|
669 |
|
|
|
670 |
|
|
|
671 |
|
|
|
672 |
|
|
|
673 |
|
|
|
674 |
|
|
|
675 |
|
|
|
676 |
|
|
|
677 |
|
|
|
678 |
|
|
|
679 |
|
|
|
680 |
|
|
|
681 |
|
|
|
682 |
|
519 |
|
683 |
|
|
|
684 |
|
|
|
|
520 |
|
|
685 |
|
521 |
|
686 |
|
522 |
|
687 |
|
523 |
|
|
|
||
690 |
|
526 |
|
691 |
|
527 |
|
692 |
|
528 |
|
|
529 |
|
|
|
530 |
|
|
|
531 |
|
|
|
532 |
|
|
|
533 |
|
|
|
534 |
|
|
|
535 |
|
|
|
536 |
|
|
|
537 |
|
|
|
538 |
|
|
|
539 |
|
|
|
540 |
|
|
|
541 |
|
|
|
542 |
|
|
|
543 |
|
|
|
544 |
|
|
|
545 |
|
|
|
546 |
|
|
693 |
|
547 |
|
694 |
|
548 |
|
695 |
|
|
|
696 |
|
|
|
697 |
|
|
|
698 |
|
|
|
699 |
|
|
|
700 |
|
|
|
701 |
|
|
|
|
549 |
|
|
|
550 |
|
|
|
551 |
|
|
|
552 |
|
|
702 |
|
553 |
|
703 |
|
554 |
|
704 |
|
555 |
|
705 |
|
|
|
706 |
|
|
|
|
556 |
|
|
|
557 |
|
|
|
558 |
|
|
707 |
|
559 |
|
708 |
|
560 |
|
709 |
|
561 |
|
|
|
||
731 |
|
583 |
|
732 |
|
584 |
|
733 |
|
585 |
|
|
586 |
|
|
|
587 |
|
|
734 |
|
588 |
|
735 |
|
589 |
|
736 |
|
590 |
|
|
|
||
750 |
|
604 |
|
751 |
|
605 |
|
752 |
|
606 |
|
753 |
|
|
|
754 |
|
|
|
|
607 |
|
|
|
608 |
|
|
|
609 |
|
|
|
610 |
|
|
|
611 |
|
|
|
612 |
|
|
|
613 |
|
|
|
614 |
|
|
|
615 |
|
|
|
616 |
|
|
|
617 |
|
|
|
618 |
|
|
755 |
|
619 |
|
756 |
|
620 |
|
757 |
|
621 |
|
758 |
|
622 |
|
759 |
|
623 |
|
760 |
|
|
|
761 |
|
|
|
|
624 |
|
|
|
625 |
|
|
|
626 |
|
|
|
627 |
|
|
762 |
|
628 |
|
763 |
|
629 |
|
764 |
|
630 |
|
765 |
|
631 |
|
766 |
|
632 |
|
767 |
|
|
|
|
633 |
|
|
768 |
|
634 |
|
769 |
|
635 |
|
770 |
|
636 |
|
|
|
||
772 |
|
638 |
|
773 |
|
639 |
|
774 |
|
640 |
|
|
641 |
|
|
|
642 |
|
|
|
643 |
|
|
|
644 |
|
|
775 |
|
645 |
|
776 |
|
646 |
|
777 |
|
647 |
|
778 |
|
648 |
|
779 |
|
649 |
|
780 |
|
|
|
781 |
|
|
|
|
650 |
|
|
|
651 |
|
|
|
652 |
|
|
|
653 |
|
|
|
654 |
|
|
782 |
|
655 |
|
783 |
|
656 |
|
784 |
|
657 |
|
|
|
||
103 |
|
103 |
|
104 |
|
104 |
|
105 |
|
105 |
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
|
114 |
|
106 |
|
115 |
|
107 |
|
116 |
|
108 |
|