After the change to move the sync_gl_drawable call outside the win_data mutex in 54d82ed4, the X11 client rect used for determining whether we need to composite/clip the drawable can be out of sync with the win32 side. This would result in offscreening when unnecessary and vice-versa.
--
v3: winex11: Use the win32 client rect in needs_client_window_clipping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7106
Jacek Caban (@jacek) commented about dlls/vbscript/global.c:
> + str = V_BSTR(&data[i]);
> +
> + if (i > lbound) {
> + string_len = SysStringLen(string);
> + tmp = SysAllocStringLen(string, string_len + delimiter_len);
> + memcpy(tmp + string_len, delimiter, delimiter_len * sizeof(WCHAR));
> + SysFreeString(string);
> + string = tmp;
> + }
> +
> + string_len = …
[View More]SysStringLen(string);
> + str_len = SysStringLen(str);
> + tmp = SysAllocStringLen(string, string_len + str_len);
> + memcpy(tmp + string_len, str, str_len * sizeof(WCHAR));
> + SysFreeString(string);
> + string = tmp;
That's potentially a lot of string reallocation. A cleaner and more efficient approach would be to first convert all necessary strings and store the results as pointers in an array and calculate the required length. Then, allocate the output buffer, and copy all the joined strings into it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7052#note_91500
[View Less]
The code looks good, but it would be better to split the test refactoring into a separate commit. Specifically, the first commit should focus on updating existing tests to use the new helpers, and the second should include the implementation changes and any new tests.
Sorry for the delay. We're currently in a code freeze, so merging this will have to wait for the 11 cycle, but we can make sure it's ready in the meantime.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7049#note_91498