1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

winemac: Remove unnecessary surface_clip_to_visible_rect.

The surface bounds aren't used anyway and surface images are cropped
to the UI layer extends, regardless of the dirty area.
This commit is contained in:
Rémi Bernon 2024-06-21 10:15:49 +02:00 committed by Alexandre Julliard
parent 22c517319a
commit 5e4a5b0be2

View File

@ -224,25 +224,6 @@ void set_surface_use_alpha(struct window_surface *window_surface, BOOL use_alpha
if (surface) surface->use_alpha = use_alpha;
}
/***********************************************************************
* surface_clip_to_visible_rect
*
* Intersect the accumulated drawn region with a new visible rect,
* effectively discarding stale drawing in the surface slack area.
*/
static void surface_clip_to_visible_rect(struct window_surface *window_surface, const RECT *visible_rect)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
RECT rect = *visible_rect;
OffsetRect(&rect, -rect.left, -rect.top);
if (!surface) return;
window_surface_lock(window_surface);
intersect_rect(&window_surface->bounds, &window_surface->bounds, &rect);
window_surface_unlock(window_surface);
}
static inline RECT get_surface_rect(const RECT *visible_rect)
{
@ -279,7 +260,6 @@ BOOL macdrv_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_r
if (EqualRect(&data->surface->rect, &surface_rect))
{
/* existing surface is good enough */
surface_clip_to_visible_rect(data->surface, visible_rect);
window_surface_add_ref(data->surface);
*surface = data->surface;
goto done;