Commit 0d001e3e authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wined3d: Use SetRect() instead of open coding it.

parent b62f4139
......@@ -4271,10 +4271,7 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
state->viewport.max_z = 1.0f;
wined3d_cs_emit_set_viewport(device->cs, &state->viewport);
state->scissor_rect.top = 0;
state->scissor_rect.left = 0;
state->scissor_rect.right = view->width;
state->scissor_rect.bottom = view->height;
SetRect(&state->scissor_rect, 0, 0, view->width, view->height);
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
......@@ -4928,10 +4925,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
state->viewport.height = view->height;
wined3d_cs_emit_set_viewport(device->cs, &state->viewport);
state->scissor_rect.top = 0;
state->scissor_rect.left = 0;
state->scissor_rect.right = view->width;
state->scissor_rect.bottom = view->height;
SetRect(&state->scissor_rect, 0, 0, view->width, view->height);
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
......
......@@ -216,10 +216,8 @@ static void surface_get_rect(const struct wined3d_surface *surface, const RECT *
{
const struct wined3d_texture *texture = surface->container;
rect_out->left = 0;
rect_out->top = 0;
rect_out->right = wined3d_texture_get_level_width(texture, surface->texture_level);
rect_out->bottom = wined3d_texture_get_level_height(texture, surface->texture_level);
SetRect(rect_out, 0, 0, wined3d_texture_get_level_width(texture, surface->texture_level),
wined3d_texture_get_level_height(texture, surface->texture_level));
}
}
......
......@@ -2602,10 +2602,7 @@ HRESULT CDECL wined3d_texture_set_overlay_position(struct wined3d_texture *textu
surface = sub_resource->u.surface;
w = surface->overlay_destrect.right - surface->overlay_destrect.left;
h = surface->overlay_destrect.bottom - surface->overlay_destrect.top;
surface->overlay_destrect.left = x;
surface->overlay_destrect.top = y;
surface->overlay_destrect.right = x + w;
surface->overlay_destrect.bottom = y + h;
SetRect(&surface->overlay_destrect, x, y, x + w, y + h);
return WINED3D_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment