Zebediah Figura : quartz: Get rid of the resize callback.

Alexandre Julliard julliard at winehq.org
Fri May 8 15:20:31 CDT 2020


Module: wine
Branch: master
Commit: 013c024b2b1247727e20c83a2e0f190728c80df5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=013c024b2b1247727e20c83a2e0f190728c80df5

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu May  7 20:50:22 2020 -0500

quartz: Get rid of the resize callback.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/quartz/quartz_private.h |  4 ----
 dlls/quartz/videorenderer.c  | 11 -----------
 dlls/quartz/vmr9.c           | 11 -----------
 dlls/quartz/window.c         |  4 ++--
 4 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h
index d3f3a8915a..33cfb5671f 100644
--- a/dlls/quartz/quartz_private.h
+++ b/dlls/quartz/quartz_private.h
@@ -106,11 +106,7 @@ struct video_window
 
 struct video_window_ops
 {
-    /* Required */
     RECT (*get_default_rect)(struct video_window *window);
-    /* Optional, WinProc Related */
-    BOOL (*resize)(struct video_window *window, LONG height, LONG width);
-
     HRESULT (*get_current_image)(struct video_window *window, LONG *size, LONG *image);
 };
 
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index 8504a51d74..e004d0fc21 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -245,16 +245,6 @@ static RECT video_renderer_get_default_rect(struct video_window *iface)
     return defRect;
 }
 
-static BOOL video_renderer_resize(struct video_window *iface, LONG Width, LONG Height)
-{
-    struct video_renderer *filter = impl_from_video_window(iface);
-
-    TRACE("WM_SIZE %d %d\n", Width, Height);
-    GetClientRect(iface->hwnd, &filter->window.dst);
-
-    return TRUE;
-}
-
 static const struct strmbase_renderer_ops renderer_ops =
 {
     .pfnCheckMediaType = VideoRenderer_CheckMediaType,
@@ -317,7 +307,6 @@ static HRESULT video_renderer_get_current_image(struct video_window *iface, LONG
 static const struct video_window_ops window_ops =
 {
     .get_default_rect = video_renderer_get_default_rect,
-    .resize = video_renderer_resize,
     .get_current_image = video_renderer_get_current_image,
 };
 
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index 64ef4a53e3..758ede6155 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -663,16 +663,6 @@ static RECT vmr_get_default_rect(struct video_window *This)
     return defRect;
 }
 
-static BOOL vmr_resize(struct video_window *This, LONG Width, LONG Height)
-{
-    struct quartz_vmr *pVMR9 = impl_from_video_window(This);
-
-    TRACE("WM_SIZE %d %d\n", Width, Height);
-    GetClientRect(This->hwnd, &pVMR9->window.dst);
-
-    return TRUE;
-}
-
 static HRESULT vmr_get_current_image(struct video_window *iface, LONG *size, LONG *image)
 {
     struct quartz_vmr *filter = impl_from_video_window(iface);
@@ -737,7 +727,6 @@ out:
 static const struct video_window_ops window_ops =
 {
     .get_default_rect = vmr_get_default_rect,
-    .resize = vmr_resize,
     .get_current_image = vmr_get_current_image,
 };
 
diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c
index d383370e5d..ada6b99ddb 100644
--- a/dlls/quartz/window.c
+++ b/dlls/quartz/window.c
@@ -68,8 +68,8 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT message, WPARAM wparam, LPARAM
         }
         break;
     case WM_SIZE:
-        if (window->ops->resize)
-            return window->ops->resize(window, LOWORD(lparam), HIWORD(lparam));
+        GetClientRect(window->hwnd, &window->dst);
+        break;
     }
 
     return DefWindowProcW(hwnd, message, wparam, lparam);




More information about the wine-cvs mailing list