[gtk/wip.win32.fixes: 492/494] GdkWin32: Clean up gdk_win32_surface_handle_queued_move_resize()
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip.win32.fixes: 492/494] GdkWin32: Clean up gdk_win32_surface_handle_queued_move_resize()
- Date: Mon, 17 Oct 2022 04:37:34 +0000 (UTC)
commit 6816af0122b26e8207e3a7dc541f1d57403ccce1
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon May 9 12:43:09 2022 +0800
GdkWin32: Clean up gdk_win32_surface_handle_queued_move_resize()
Make that function accept a GdkSurface, not a GdkDrawContext, to make things
clearer to people.
gdk/win32/gdkcairocontext-win32.c | 2 +-
gdk/win32/gdkglcontext-win32-egl.c | 4 +++-
gdk/win32/gdkglcontext-win32-wgl.c | 4 +++-
gdk/win32/gdksurface-win32.c | 4 +---
gdk/win32/gdksurface-win32.h | 2 +-
gdk/win32/gdkvulkancontext-win32.c | 4 +++-
6 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/gdk/win32/gdkcairocontext-win32.c b/gdk/win32/gdkcairocontext-win32.c
index 480baf7802..0a87c4031e 100644
--- a/gdk/win32/gdkcairocontext-win32.c
+++ b/gdk/win32/gdkcairocontext-win32.c
@@ -66,7 +66,7 @@ gdk_win32_cairo_context_begin_frame (GdkDrawContext *draw_context,
surface = gdk_draw_context_get_surface (draw_context);
scale = gdk_surface_get_scale_factor (surface);
- queued_window_rect = gdk_win32_surface_handle_queued_move_resize (draw_context);
+ queued_window_rect = gdk_win32_surface_handle_queued_move_resize (surface);
width = queued_window_rect.right - queued_window_rect.left;
height = queued_window_rect.bottom - queued_window_rect.top;
diff --git a/gdk/win32/gdkglcontext-win32-egl.c b/gdk/win32/gdkglcontext-win32-egl.c
index 684c68c2ca..35b742830d 100644
--- a/gdk/win32/gdkglcontext-win32-egl.c
+++ b/gdk/win32/gdkglcontext-win32-egl.c
@@ -119,7 +119,9 @@ gdk_win32_gl_context_egl_begin_frame (GdkDrawContext *draw_context,
gboolean prefers_high_depth,
cairo_region_t *update_area)
{
- gdk_win32_surface_handle_queued_move_resize (draw_context);
+ GdkSurface *surface = gdk_draw_context_get_surface (draw_context);
+
+ gdk_win32_surface_handle_queued_move_resize (surface);
GDK_DRAW_CONTEXT_CLASS (gdk_win32_gl_context_egl_parent_class)->begin_frame (draw_context,
prefers_high_depth, update_area);
}
diff --git a/gdk/win32/gdkglcontext-win32-wgl.c b/gdk/win32/gdkglcontext-win32-wgl.c
index f15d64d34b..09a9f160cb 100644
--- a/gdk/win32/gdkglcontext-win32-wgl.c
+++ b/gdk/win32/gdkglcontext-win32-wgl.c
@@ -121,7 +121,9 @@ gdk_win32_gl_context_wgl_begin_frame (GdkDrawContext *draw_context,
gboolean prefers_high_depth,
cairo_region_t *update_area)
{
- gdk_win32_surface_handle_queued_move_resize (draw_context);
+ GdkSurface *surface = gdk_draw_context_get_surface (draw_context);
+
+ gdk_win32_surface_handle_queued_move_resize (surface);
GDK_DRAW_CONTEXT_CLASS (gdk_win32_gl_context_wgl_parent_class)->begin_frame (draw_context,
prefers_high_depth, update_area);
}
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index d5bdb53980..8ce1d0ba91 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -5117,14 +5117,12 @@ gdk_win32_surface_apply_queued_move_resize (GdkSurface *surface,
}
RECT
-gdk_win32_surface_handle_queued_move_resize (GdkDrawContext *draw_context)
+gdk_win32_surface_handle_queued_move_resize (GdkSurface *surface)
{
- GdkSurface *surface;
GdkWin32Surface *impl;
int scale;
RECT queued_window_rect;
- surface = gdk_draw_context_get_surface (draw_context);
impl = GDK_WIN32_SURFACE (surface);
scale = gdk_surface_get_scale_factor (surface);
diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h
index cff41117ef..756b06eb1a 100644
--- a/gdk/win32/gdksurface-win32.h
+++ b/gdk/win32/gdksurface-win32.h
@@ -374,7 +374,7 @@ void gdk_win32_surface_move_resize (GdkSurface *window,
int height);
RECT
-gdk_win32_surface_handle_queued_move_resize (GdkDrawContext *draw_context);
+gdk_win32_surface_handle_queued_move_resize (GdkSurface *surface);
#ifdef HAVE_EGL
EGLSurface gdk_win32_surface_get_egl_surface (GdkSurface *surface,
diff --git a/gdk/win32/gdkvulkancontext-win32.c b/gdk/win32/gdkvulkancontext-win32.c
index 894bbfa548..88a37f6985 100644
--- a/gdk/win32/gdkvulkancontext-win32.c
+++ b/gdk/win32/gdkvulkancontext-win32.c
@@ -71,7 +71,9 @@ gdk_win32_vulkan_context_begin_frame (GdkDrawContext *draw_context,
gboolean prefers_high_depth,
cairo_region_t *update_area)
{
- gdk_win32_surface_handle_queued_move_resize (draw_context);
+ GdkSurface *surface = gdk_draw_context_get_surface (draw_context);
+
+ gdk_win32_surface_handle_queued_move_resize (surface);
GDK_DRAW_CONTEXT_CLASS (gdk_win32_vulkan_context_parent_class)->begin_frame (draw_context,
prefers_high_depth, update_area);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]