[PATCH 3/4] wined3d: Clip blits from / to the front buffer to the GL drawable.

Stefan Dösinger stefandoesinger at gmail.com
Tue Jul 7 14:43:12 CDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 2015-07-07 um 16:59 schrieb Henri Verbeet:
> On 6 July 2015 at 23:47, Stefan Dösinger <stefan at codeweavers.com>
> wrote:
>> -void surface_translate_drawable_coords(const struct wined3d_surface *surface, HWND window, RECT *rect)
>> +BOOL surface_clip_drawable_coords(const struct wined3d_surface *surface, HWND window,
>> +        RECT *screen_rect, RECT *other)
> Can we please call these "src_rect" and "dst_rect" instead of
> "screen_rect" and "other"? It probably wouldn't hurt to mention "blt"
> somewhere in the function name either.
I think "src" and "dst" would be misleading. This function is used for
blits to the frontbuffer and blits from the frontbuffer. The function
doesn't care about the direction of the blit. It's always the
rectangle used for accessing the frontbuffer that is clipped to the GL
drawable size and location.

The same applies to the parameters of wined3d_clip_blit.

>> +        ClientToScreen(window, &offset);
> ...
>> -        ScreenToClient(window, &offset);
>> -        OffsetRect(rect, offset.x, offset.y);
>> +        /* Finally, translate the screen coordinate rectangle to client coordinates. */
>> +        OffsetRect(screen_rect, -offset.x, -offset.y);
> That change seems pretty pointless.
Hmm right, it does seem a bit stupid :-) .


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVnCvQAAoJEN0/YqbEcdMwXUsP/iFZahsoYj02j/p2OskgX04I
KCyFOhiCRUZDDHCEgL1W9lnqNhuN0A0c5v1y7JmRhvzSG/YbJnMqSoBctvLzVEdx
Y/BbmF96pHkYlIOJ5MhcMJLYY70h6gQKbRhC7Xgw+sCw6eCte1kRyQN8oVQAoA91
0KHMcbvXpkCTGxlge4+zdgbs6YkZudeusLi1iYJk9pzkuLzaH9MsPFl2nNL77wrr
bLjAecx3a76d1p+FcFGSEZy6+1LF6AOEX5I1EUPsnlZ/nE/upSKi0foPxmn1ju4r
U6rOCM0KMWiRfapQi5logfhzFKSVVaFP8dAauKkU2yBAM8pg1S2msUlVzXeRHHIc
7UbXTu/Ow9uEyrhXx3ASnqFKVeMCdKbS5fLD85kqEGLOM07xkYrUtRa4v6OPDNRI
oR43Khq18lyHWH0ZQvTxsv3L1OertAYpJcNnnNdHjy7MOr+dfaBqiOZP/fB9RG6e
sSAXP+SfU/YcLFZJYtqm50y0TaQ1Rw18zx5Bg7bkyB5s6bqA6ko+NCDxchY7lPH+
lGUD7/Y9uAe70PkHxILS1jOv4fujwkrQ2Qjspo/V/dYrMDffVm798hmfvFY+Y4ah
9bzdDq5dsIqkPmYXeyq4EFnmNOKcIAnNGkcdxlK79vffzVMrrKE1RJGuyEO0ZkBe
QXvNmVCcPYA/pq33VKB/
=qeB0
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list