Two little vga fixes.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJbFPz1AAoJEEy22O7T6HE42+AP/2/jNWqsXYWNWK14jxCRi50D TZpx4t4suUVvH2ZHSKOTbkOsISg4rAceDsoMH25o0w/hZZFUw+aU275+K/wLejQs lC3r3Cl0Zs8FNbeRMtw9JIP243hNTuWQhZ1gkIP9zcEpkFY5zik71L/SBb7aYDqb ZqXjGGGLVZiDC6WGLebO7orSorr1a86MiAv9tQ9fwELCofaNQzxtcBPMrNmu8T8Z 3rnZFdjTdSc9A6jlAZP83CR9WRFl5BzJ1cppagHaJIH2YpRgHo4hDd7z+xQpndn3 jKva+wEYeXuL5PCLk2mKa+3XUPeo3qnROofhogbI8YOORGBgM+efxA7NBAzGrtVa n1ZUMc0hYec5/CrHC4U4c/liojT4gXR7xK1senvXnrlwcmXqv3ILOrcugU4c2oMB znXOGe++V+RVKYJw2aJCl9/SCJw4taWql4GK7NJSO8+C25IDNaxR/ohX1IvPZDyC tlS1v69wZ+o7IyF8B/DZIkswzGvt52WDSdhoA5f4ReeGK/fypuK3VkS4nh63p3OU jlf7bvLCGc9RzqwUdj2zWNXKgEA4yOGHYFQ/wGEl3MrKkYzyOoC33ChPUOk5Zn/7 81Yed9RsAYd0PsT5FLsjhBT2ydOIYg12C+r6MLt4ES2/HKSz86KGY6lMSUHuHd/R MHJQ/ihwfUNZGWX7mSQW =L6Ri -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180604-pull-request' into staging Two little vga fixes. # gpg: Signature made Mon 04 Jun 2018 09:48:53 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20180604-pull-request: vga: cleanup surface handling bochs-display: add missing break Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
5d7ad3ce10
@ -158,6 +158,7 @@ static int bochs_display_get_mode(BochsDisplayState *s,
|
||||
/* best effort: support native endianess only */
|
||||
mode->format = PIXMAN_r5g6b5;
|
||||
mode->bytepp = 2;
|
||||
break;
|
||||
case 32:
|
||||
mode->format = s->big_endian_fb
|
||||
? PIXMAN_BE_x8r8g8b8
|
||||
|
@ -1548,12 +1548,31 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
||||
} else {
|
||||
share_surface = false;
|
||||
}
|
||||
|
||||
if (s->line_offset != s->last_line_offset ||
|
||||
disp_width != s->last_width ||
|
||||
height != s->last_height ||
|
||||
s->last_depth != depth ||
|
||||
s->last_byteswap != byteswap ||
|
||||
share_surface != is_buffer_shared(surface)) {
|
||||
/* display parameters changed -> need new display surface */
|
||||
s->last_scr_width = disp_width;
|
||||
s->last_scr_height = height;
|
||||
s->last_width = disp_width;
|
||||
s->last_height = height;
|
||||
s->last_line_offset = s->line_offset;
|
||||
s->last_depth = depth;
|
||||
s->last_byteswap = byteswap;
|
||||
full_update = 1;
|
||||
}
|
||||
if (surface_data(surface) != s->vram_ptr + (s->start_addr * 4)
|
||||
&& is_buffer_shared(surface)) {
|
||||
/* base address changed (page flip) -> shared display surfaces
|
||||
* must be updated with the new base address */
|
||||
full_update = 1;
|
||||
}
|
||||
|
||||
if (full_update) {
|
||||
if (share_surface) {
|
||||
surface = qemu_create_displaysurface_from(disp_width,
|
||||
height, format, s->line_offset,
|
||||
@ -1563,23 +1582,6 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
||||
qemu_console_resize(s->con, disp_width, height);
|
||||
surface = qemu_console_surface(s->con);
|
||||
}
|
||||
s->last_scr_width = disp_width;
|
||||
s->last_scr_height = height;
|
||||
s->last_width = disp_width;
|
||||
s->last_height = height;
|
||||
s->last_line_offset = s->line_offset;
|
||||
s->last_depth = depth;
|
||||
s->last_byteswap = byteswap;
|
||||
full_update = 1;
|
||||
} else if (is_buffer_shared(surface) &&
|
||||
(full_update || surface_data(surface) != s->vram_ptr
|
||||
+ (s->start_addr * 4))) {
|
||||
pixman_format_code_t format =
|
||||
qemu_default_pixman_format(depth, !byteswap);
|
||||
surface = qemu_create_displaysurface_from(disp_width,
|
||||
height, format, s->line_offset,
|
||||
s->vram_ptr + (s->start_addr * 4));
|
||||
dpy_gfx_replace_surface(s->con, surface);
|
||||
}
|
||||
|
||||
if (shift_control == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user