ui+display: rename is_placeholder() -> surface_is_placeholder()
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 5 Jun 2024 13:14:42 +0000 (15:14 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 19 Jun 2024 10:42:03 +0000 (12:42 +0200)
No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240605131444.797896-3-kraxel@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/ui/surface.h
ui/console.c
ui/sdl2-2d.c
ui/sdl2-gl.c

index 4244e0ca4a3298dde2f4fdda7d8de3410894f6a6..273bb4769a0224cc4153438f09a4b26347ab1476 100644 (file)
@@ -50,7 +50,7 @@ static inline int is_buffer_shared(DisplaySurface *surface)
     return !(surface->flags & QEMU_ALLOCATED_FLAG);
 }
 
-static inline int is_placeholder(DisplaySurface *surface)
+static inline int surface_is_placeholder(DisplaySurface *surface)
 {
     return surface->flags & QEMU_PLACEHOLDER_FLAG;
 }
index 1b2cd0c7365dcc55744213917378020d0d40458b..c2173fc0b1e5a07c6477bbe6b4ef8c5fa482af11 100644 (file)
@@ -1510,7 +1510,7 @@ void qemu_console_resize(QemuConsole *s, int width, int height)
     assert(QEMU_IS_GRAPHIC_CONSOLE(s));
 
     if ((s->scanout.kind != SCANOUT_SURFACE ||
-         (surface && !is_buffer_shared(surface) && !is_placeholder(surface))) &&
+         (surface && !is_buffer_shared(surface) && !surface_is_placeholder(surface))) &&
         qemu_console_get_width(s, -1) == width &&
         qemu_console_get_height(s, -1) == height) {
         return;
index 06468cd493eade8a43f17bb9708f9d23e9ee1449..73052383c2e0f0c00e2b559711edc1fb413ba763 100644 (file)
@@ -72,7 +72,7 @@ void sdl2_2d_switch(DisplayChangeListener *dcl,
         scon->texture = NULL;
     }
 
-    if (is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) {
+    if (surface_is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) {
         sdl2_window_destroy(scon);
         return;
     }
index 28d796607c08ea268322849b9897a6d1ba54bf1e..91b7ee2419b7614c6886412a1940269c269de578 100644 (file)
@@ -89,7 +89,7 @@ void sdl2_gl_switch(DisplayChangeListener *dcl,
 
     scon->surface = new_surface;
 
-    if (is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) {
+    if (surface_is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) {
         qemu_gl_fini_shader(scon->gls);
         scon->gls = NULL;
         sdl2_window_destroy(scon);