winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
879 discussions
Start a n
N
ew thread
Mike Kaplinskiy : ws2_32: Use the iosb to keep track of how many bytes we sent.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: a06144d9caaac3697def66c1c69fc1bb73cf1e87 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a06144d9caaac3697def66c1c…
Author: Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> Date: Mon Jan 24 00:19:19 2011 -0500 ws2_32: Use the iosb to keep track of how many bytes we sent. --- dlls/ws2_32/socket.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 6b3925b..66def56 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1807,6 +1807,7 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu if (result >= 0) { status = STATUS_SUCCESS; + iosb->Information += result; } else if (errno == EINTR || errno == EAGAIN) { @@ -1815,14 +1816,12 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu else { status = wsaErrStatus(); - result = 0; } break; } if (status != STATUS_PENDING) { iosb->u.Status = status; - iosb->Information = result; *apc = ws2_async_apc; } return status;
1
0
0
0
Mike Kaplinskiy : ws2_32: Fix up iovecs after transmission in WS2_send instead of WS2_sendto.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 388398bd057c6292414f5b875c58b59d765a2562 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=388398bd057c6292414f5b875…
Author: Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> Date: Mon Jan 24 00:19:12 2011 -0500 ws2_32: Fix up iovecs after transmission in WS2_send instead of WS2_sendto. --- dlls/ws2_32/socket.c | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 43d4598..6b3925b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1725,6 +1725,7 @@ static int WS2_send( int fd, struct ws2_async *wsa ) { struct msghdr hdr; union generic_unix_sockaddr unix_addr; + int n, ret; hdr.msg_name = NULL; hdr.msg_namelen = 0; @@ -1768,7 +1769,19 @@ static int WS2_send( int fd, struct ws2_async *wsa ) hdr.msg_flags = 0; #endif - return sendmsg(fd, &hdr, wsa->flags); + ret = sendmsg(fd, &hdr, wsa->flags); + if (ret >= 0) + { + n = ret; + while (wsa->first_iovec < wsa->n_iovecs && wsa->iovec[wsa->first_iovec].iov_len <= n) + n -= wsa->iovec[wsa->first_iovec++].iov_len; + if (wsa->first_iovec < wsa->n_iovecs) + { + wsa->iovec[wsa->first_iovec].iov_base = (char*)wsa->iovec[wsa->first_iovec].iov_base + n; + wsa->iovec[wsa->first_iovec].iov_len -= n; + } + } + return ret; } /*********************************************************************** @@ -3942,23 +3955,13 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, * sending blocks until the entire buffer is sent. */ DWORD timeout_start = GetTickCount(); - *lpNumberOfBytesSent = 0; + *lpNumberOfBytesSent = n == -1 ? 0 : n; - while (wsa->first_iovec < dwBufferCount) + while (wsa->first_iovec < wsa->n_iovecs) { struct pollfd pfd; int timeout = GET_SNDTIMEO(fd); - if (n >= 0) - { - *lpNumberOfBytesSent += n; - while (wsa->first_iovec < dwBufferCount && wsa->iovec[wsa->first_iovec].iov_len <= n) - n -= wsa->iovec[wsa->first_iovec++].iov_len; - if (wsa->first_iovec >= dwBufferCount) break; - wsa->iovec[wsa->first_iovec].iov_base = (char*)wsa->iovec[wsa->first_iovec].iov_base + n; - wsa->iovec[wsa->first_iovec].iov_len -= n; - } - if (timeout != -1) { timeout -= GetTickCount() - timeout_start; @@ -3980,6 +3983,9 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, err = wsaErrno(); goto error; } + + if (n >= 0) + *lpNumberOfBytesSent += n; } } else /* non-blocking */
1
0
0
0
Mike Kaplinskiy : ws2_32: Allow sending FD_WRITE right after scheduling the async.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: e6fee3596d5739f947a4909195fd1d5579def081 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6fee3596d5739f947a490919…
Author: Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> Date: Mon Jan 24 00:19:06 2011 -0500 ws2_32: Allow sending FD_WRITE right after scheduling the async. The server won't actually send the event until the request is done. --- dlls/ws2_32/socket.c | 26 ++++++++++---------------- 1 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index f7607c5..43d4598 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1793,26 +1793,16 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu if (result >= 0) { - int totalLength = 0; - unsigned int i; status = STATUS_SUCCESS; - for (i = 0; i < wsa->n_iovecs; i++) - totalLength += wsa->iovec[i].iov_len; - if (result < totalLength) - _enable_event( wsa->hSocket, FD_WRITE, 0, 0 ); + } + else if (errno == EINTR || errno == EAGAIN) + { + status = STATUS_PENDING; } else { - if (errno == EINTR || errno == EAGAIN) - { - status = STATUS_PENDING; - _enable_event( wsa->hSocket, FD_WRITE, 0, 0 ); - } - else - { - status = wsaErrStatus(); - result = 0; - } + status = wsaErrStatus(); + result = 0; } break; } @@ -3922,6 +3912,10 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, } SERVER_END_REQ; + /* Enable the event only after starting the async. The server will deliver it as soon as + the async is done. */ + _enable_event(SOCKET2HANDLE(s), FD_WRITE, 0, 0); + if (err != STATUS_PENDING) HeapFree( GetProcessHeap(), 0, wsa ); WSASetLastError( NtStatusToWSAError( err )); return SOCKET_ERROR;
1
0
0
0
Mike Kaplinskiy : ws2_32/tests: Add a test for an overlapped send.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: a0c810c1779ff344eef2701d5942b4f0cd4a71c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0c810c1779ff344eef2701d5…
Author: Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> Date: Mon Jan 24 00:18:59 2011 -0500 ws2_32/tests: Add a test for an overlapped send. --- dlls/ws2_32/tests/sock.c | 69 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 66 insertions(+), 3 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 1b81544..77925b5 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2793,8 +2793,13 @@ static void test_send(void) HANDLE hThread = NULL; const int buflen = 1024*1024; char *buffer = NULL; - int ret; - DWORD id; + int ret, i, zero = 0; + WSABUF buf; + OVERLAPPED ov; + BOOL bret; + DWORD id, bytes_sent, dwRet; + + memset(&ov, 0, sizeof(ov)); if (tcp_socketpair(&src, &dst) != 0) { @@ -2802,6 +2807,11 @@ static void test_send(void) return; } + set_blocking(dst, FALSE); + /* force disable buffering so we can get a pending overlapped request */ + ret = setsockopt(dst, SOL_SOCKET, SO_SNDBUF, (char *) &zero, sizeof(zero)); + ok(!ret, "setsockopt SO_SNDBUF failed: %d - %d\n", ret, GetLastError()); + hThread = CreateThread(NULL, 0, drain_socket_thread, &dst, 0, &id); if (hThread == NULL) { @@ -2809,19 +2819,70 @@ static void test_send(void) goto end; } - buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buflen); + buffer = HeapAlloc(GetProcessHeap(), 0, buflen); if (buffer == NULL) { ok(0, "HeapAlloc failed, error %d\n", GetLastError()); goto end; } + /* fill the buffer with some nonsense */ + for (i = 0; i < buflen; ++i) + { + buffer[i] = (char) i; + } + ret = send(src, buffer, buflen, 0); if (ret >= 0) ok(ret == buflen, "send should have sent %d bytes, but it only sent %d\n", buflen, ret); else ok(0, "send failed, error %d\n", WSAGetLastError()); + buf.buf = buffer; + buf.len = buflen; + + ov.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + ok(ov.hEvent != NULL, "could not create event object, errno = %d\n", GetLastError()); + if (!ov.hEvent) + goto end; + + bytes_sent = 0; + ret = WSASend(dst, &buf, 1, &bytes_sent, 0, &ov, NULL); + todo_wine ok((ret == SOCKET_ERROR && GetLastError() == ERROR_IO_PENDING) || broken(bytes_sent == buflen), + "Failed to start overlapped send %d - %d - %d/%d\n", ret, WSAGetLastError(), bytes_sent, buflen); + if ( (ret != SOCKET_ERROR || GetLastError() != ERROR_IO_PENDING) && bytes_sent < buflen ) + goto end; + + /* don't check for completion yet, we may need to drain the buffer while still sending */ + set_blocking(src, FALSE); + for (i = 0; i < buflen; ++i) + { + int j = 0; + + ret = recv(src, buffer, 1, 0); + while (ret == SOCKET_ERROR && GetLastError() == WSAEWOULDBLOCK && j < 100) + { + j++; + Sleep(50); + ret = recv(src, buffer, 1, 0); + } + + ok(ret == 1, "Failed to receive data %d - %d (got %d/%d)\n", ret, GetLastError(), i, buflen); + if (ret != 1) + break; + + ok(buffer[0] == (char) i, "Received bad data at position %d\n", i); + } + + dwRet = WaitForSingleObject(ov.hEvent, 1000); + ok(dwRet == WAIT_OBJECT_0, "Failed to wait for recv message: %d - %d\n", dwRet, GetLastError()); + if (dwRet == WAIT_OBJECT_0) + { + bret = GetOverlappedResult((HANDLE)dst, &ov, &bytes_sent, FALSE); + ok((bret && bytes_sent == buflen) || broken(!bret && GetLastError() == ERROR_IO_INCOMPLETE) /* win9x */, + "Got %d instead of %d (%d - %d)\n", bytes_sent, buflen, bret, GetLastError()); + } + end: if (src != INVALID_SOCKET) closesocket(src); @@ -2829,6 +2890,8 @@ end: closesocket(dst); if (hThread != NULL) CloseHandle(hThread); + if (ov.hEvent) + CloseHandle(ov.hEvent); HeapFree(GetProcessHeap(), 0, buffer); }
1
0
0
0
Greg Geldorp : riched20/tests: Fix editor tests.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 997a681300728073fe1b9b432ee97388d8c83006 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=997a681300728073fe1b9b432…
Author: Greg Geldorp <ggeldorp(a)vmware.com> Date: Mon Jan 24 11:46:16 2011 +0100 riched20/tests: Fix editor tests. --- dlls/riched20/tests/editor.c | 33 ++++++++++++++++++++++++++------- 1 files changed, 26 insertions(+), 7 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 57827db..9456cde 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -520,11 +520,13 @@ static void test_EM_SCROLLCARET(void) static void test_EM_POSFROMCHAR(void) { HWND hwndRichEdit = new_richedit(NULL); - int i; + int i, expected; LRESULT result; unsigned int height = 0; int xpos = 0; POINTL pt; + LOCALESIGNATURE sig; + BOOL rtl; static const char text[] = "aa\n" "this is a long line of text that should be longer than the " "control's width\n" @@ -535,6 +537,10 @@ static void test_EM_POSFROMCHAR(void) "gg\n" "hh\n"; + rtl = (GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_FONTSIGNATURE, + (LPSTR) &sig, sizeof(LOCALESIGNATURE)) && + (sig.lsUsb[3] & 0x08000000) != 0); + /* Fill the control to lines to ensure that most of them are offscreen */ for (i = 0; i < 50; i++) { @@ -586,7 +592,8 @@ static void test_EM_POSFROMCHAR(void) /* Testing position way past end of text */ result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 55 * 16, 0); ok(HIWORD(result) == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), 50 * height); - ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + expected = (rtl ? 8 : 1); + ok(LOWORD(result) == expected, "EM_POSFROMCHAR reports x=%d, expected %d\n", LOWORD(result), expected); /* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */ SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down */ @@ -608,7 +615,8 @@ static void test_EM_POSFROMCHAR(void) /* Testing position way past end of text */ result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 55 * 16, 0); ok(HIWORD(result) == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), (50 - 1) * height); - ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); + expected = (rtl ? 8 : 1); + ok(LOWORD(result) == expected, "EM_POSFROMCHAR reports x=%d, expected %d\n", LOWORD(result), expected); /* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */ SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); @@ -636,7 +644,7 @@ static void test_EM_POSFROMCHAR(void) SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)); ok(pt.x > xpos, "pt.x = %d\n", pt.x); - xpos = pt.x; + xpos = (rtl ? pt.x + 7 : pt.x); SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)+1); ok(pt.x == xpos, "pt.x = %d\n", pt.x); @@ -666,6 +674,12 @@ static void test_EM_SETCHARFORMAT(void) }; int i; CHARRANGE cr; + LOCALESIGNATURE sig; + BOOL rtl; + + rtl = (GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_FONTSIGNATURE, + (LPSTR) &sig, sizeof(LOCALESIGNATURE)) && + (sig.lsUsb[3] & 0x08000000) != 0); /* Invalid flags, CHARFORMAT2 structure blanked out */ memset(&cf2, 0, sizeof(cf2)); @@ -764,8 +778,13 @@ static void test_EM_SETCHARFORMAT(void) ok(rc == 0, "Text marked as modified, expected not modified!\n"); rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, 0, (LPARAM) &cf2); ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); + if (! rtl) + { + rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); + ok(rc == 0, "Text marked as modified, expected not modified!\n"); + } + else + skip("RTL language found\n"); /* wParam==SCF_SELECTION sets modify if nonempty selection */ SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); @@ -6086,7 +6105,7 @@ static void test_EM_CHARFROMPOS(void) todo_wine ok(result == 33, "expected character index of 33 but got %d\n", result); point.x = 1000; - point.y = 40; + point.y = 36; result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); todo_wine ok(result == 39, "expected character index of 39 but got %d\n", result);
1
0
0
0
Dmitry Timoshkov : winex11.drv: Associate the real DC transformation with cached font data.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 3e850b5b1439032f0e396a91169442da8e4786c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e850b5b1439032f0e396a911…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Mon Jan 24 18:40:13 2011 +0800 winex11.drv: Associate the real DC transformation with cached font data. This matches what WineEngCreateFontInstance() does, and makes applications which set custom axes directions using different window/viewport extents display text correctly. --- dlls/winex11.drv/xrender.c | 6 +++++- include/wingdi.h | 1 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index f0ec1b1..fde0b91 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1066,7 +1066,11 @@ BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont) lfsz.lf.lfWidth = abs( lfsz.lf.lfWidth ); lfsz.devsize.cx = X11DRV_XWStoDS( physDev, lfsz.lf.lfWidth ); lfsz.devsize.cy = X11DRV_YWStoDS( physDev, lfsz.lf.lfHeight ); - GetWorldTransform( physDev->hdc, &lfsz.xform ); + + GetTransform( physDev->hdc, 0x204, &lfsz.xform ); + TRACE("font transform %f %f %f %f\n", lfsz.xform.eM11, lfsz.xform.eM12, + lfsz.xform.eM21, lfsz.xform.eM22); + /* Not used fields, would break hashing */ lfsz.xform.eDx = lfsz.xform.eDy = 0; diff --git a/include/wingdi.h b/include/wingdi.h index 12e28dc..29fb351 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -3590,6 +3590,7 @@ WINGDIAPI INT WINAPI GetTextFaceW(HDC,INT,LPWSTR); WINGDIAPI BOOL WINAPI GetTextMetricsA(HDC,LPTEXTMETRICA); WINGDIAPI BOOL WINAPI GetTextMetricsW(HDC,LPTEXTMETRICW); #define GetTextMetrics WINELIB_NAME_AW(GetTextMetrics) +WINGDIAPI BOOL WINAPI GetTransform(HDC,DWORD,XFORM*); WINGDIAPI BOOL WINAPI GetViewportExtEx(HDC,LPSIZE); WINGDIAPI BOOL WINAPI GetViewportOrgEx(HDC,LPPOINT); WINGDIAPI BOOL WINAPI GetWindowExtEx(HDC,LPSIZE);
1
0
0
0
Henri Verbeet : wined3d: Use dot() instead of length() in shader_glsl_nrm() .
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: a50546e563efad3b25222ca965a2e52a83111d95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a50546e563efad3b25222ca96…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jan 24 11:19:40 2011 +0100 wined3d: Use dot() instead of length() in shader_glsl_nrm(). As Eric Anholt pointed out, using length() here is suboptimal. It essentially translates into "inversesqrt(dot(x, x));", but needs to handle the case of zero-length vectors, much like nrm. --- dlls/wined3d/glsl_shader.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index a59e54b..c4e4188 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -2314,16 +2314,18 @@ static void shader_glsl_nrm(const struct wined3d_shader_instruction *ins) mask_size = shader_glsl_get_write_mask_size(write_mask); shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src_param); - shader_addline(buffer, "tmp0.x = length(%s);\n", src_param.param_str); + shader_addline(buffer, "tmp0.x = dot(%s, %s);\n", + src_param.param_str, src_param.param_str); shader_glsl_append_dst(buffer, ins); + if (mask_size > 1) { - shader_addline(buffer, "tmp0.x == 0.0 ? vec%u(0.0) : (%s / tmp0.x));\n", + shader_addline(buffer, "tmp0.x == 0.0 ? vec%u(0.0) : (%s * inversesqrt(tmp0.x)));\n", mask_size, src_param.param_str); } else { - shader_addline(buffer, "tmp0.x == 0.0 ? 0.0 : (%s / tmp0.x));\n", + shader_addline(buffer, "tmp0.x == 0.0 ? 0.0 : (%s * inversesqrt(tmp0.x)));\n", src_param.param_str); } }
1
0
0
0
Henri Verbeet : wined3d: WINED3DFMT_INTZ is a FOURCC format.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 010e285b88bac605e27faaf66a2d57d725890718 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=010e285b88bac605e27faaf66…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jan 24 11:19:39 2011 +0100 wined3d: WINED3DFMT_INTZ is a FOURCC format. This is mostly for consistency, in practice ddraw code is never going to use this format. --- dlls/wined3d/utils.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 15ff298..c114f10 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -157,6 +157,7 @@ static const struct wined3d_format_base_flags format_base_flags[] = {WINED3DFMT_MULTI2_ARGB8, WINED3DFMT_FLAG_FOURCC}, {WINED3DFMT_G8R8_G8B8, WINED3DFMT_FLAG_FOURCC}, {WINED3DFMT_R8G8_B8G8, WINED3DFMT_FLAG_FOURCC}, + {WINED3DFMT_INTZ, WINED3DFMT_FLAG_FOURCC}, {WINED3DFMT_P8_UINT, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_B8G8R8_UNORM, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_FLAG_GETDC},
1
0
0
0
Henri Verbeet : wined3d: Remove IWineD3DSurface::DrawOverlay() from the public interface.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 4891ca168e9841918797f6811482e42a980d076b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4891ca168e9841918797f6811…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jan 24 11:19:38 2011 +0100 wined3d: Remove IWineD3DSurface::DrawOverlay() from the public interface. --- dlls/wined3d/surface.c | 60 ++++++++++++++++++++-------------------- dlls/wined3d/surface_base.c | 4 +- dlls/wined3d/surface_gdi.c | 13 ++++---- dlls/wined3d/wined3d_private.h | 1 + include/wine/wined3d.idl | 2 - 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 658e3fc..2300a68 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -386,9 +386,32 @@ static void surface_realize_palette(IWineD3DSurfaceImpl *surface) surface_load_location(surface, SFLAG_INDRAWABLE, NULL); } +static HRESULT surface_draw_overlay(IWineD3DSurfaceImpl *surface) +{ + HRESULT hr; + + /* If there's no destination surface there is nothing to do. */ + if (!surface->overlay_dest) + return WINED3D_OK; + + /* Blt calls ModifyLocation on the dest surface, which in turn calls + * DrawOverlay to update the overlay. Prevent an endless recursion. */ + if (surface->overlay_dest->flags & SFLAG_INOVERLAYDRAW) + return WINED3D_OK; + + surface->overlay_dest->flags |= SFLAG_INOVERLAYDRAW; + hr = IWineD3DSurface_Blt((IWineD3DSurface *)surface->overlay_dest, + &surface->overlay_destrect, (IWineD3DSurface *)surface, &surface->overlay_srcrect, + WINEDDBLT_WAIT, NULL, WINED3DTEXF_LINEAR); + surface->overlay_dest->flags &= ~SFLAG_INOVERLAYDRAW; + + return hr; +} + static const struct wined3d_surface_ops surface_ops = { surface_realize_palette, + surface_draw_overlay, }; HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, @@ -2070,9 +2093,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Unmap(IWineD3DSurface *iface) memset(&This->lockedRect, 0, sizeof(RECT)); /* Overlays have to be redrawn manually after changes with the GL implementation */ - if(This->overlay_dest) { - IWineD3DSurface_DrawOverlay(iface); - } + if (This->overlay_dest) + This->surface_ops->surface_draw_overlay(This); + return WINED3D_OK; } @@ -2775,11 +2798,10 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DS flip_surface(This, (IWineD3DSurfaceImpl *) override); /* Update the overlay if it is visible */ - if(This->overlay_dest) { - return IWineD3DSurface_DrawOverlay((IWineD3DSurface *) This); - } else { + if (This->overlay_dest) + return This->surface_ops->surface_draw_overlay(This); + else return WINED3D_OK; - } } if(override) { @@ -4306,7 +4328,7 @@ void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL pers { LIST_FOR_EACH_ENTRY(overlay, &surface->overlays, IWineD3DSurfaceImpl, overlay_entry) { - IWineD3DSurface_DrawOverlay((IWineD3DSurface *)overlay); + overlay->surface_ops->surface_draw_overlay(overlay); } } } @@ -4641,27 +4663,6 @@ static WINED3DSURFTYPE WINAPI IWineD3DSurfaceImpl_GetImplType(IWineD3DSurface *i return SURFACE_OPENGL; } -static HRESULT WINAPI IWineD3DSurfaceImpl_DrawOverlay(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - HRESULT hr; - - /* If there's no destination surface there is nothing to do */ - if(!This->overlay_dest) return WINED3D_OK; - - /* Blt calls ModifyLocation on the dest surface, which in turn calls DrawOverlay to - * update the overlay. Prevent an endless recursion. */ - if (This->overlay_dest->flags & SFLAG_INOVERLAYDRAW) - return WINED3D_OK; - - This->overlay_dest->flags |= SFLAG_INOVERLAYDRAW; - hr = IWineD3DSurfaceImpl_Blt((IWineD3DSurface *)This->overlay_dest, - &This->overlay_destrect, iface, &This->overlay_srcrect, - WINEDDBLT_WAIT, NULL, WINED3DTEXF_LINEAR); - This->overlay_dest->flags &= ~SFLAG_INOVERLAYDRAW; - - return hr; -} - BOOL surface_is_offscreen(IWineD3DSurfaceImpl *surface) { IWineD3DSwapChainImpl *swapchain = surface->container.u.swapchain; @@ -4721,7 +4722,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = IWineD3DSurfaceImpl_SetFormat, IWineD3DSurfaceImpl_PrivateSetup, IWineD3DSurfaceImpl_GetImplType, - IWineD3DSurfaceImpl_DrawOverlay }; static HRESULT ffp_blit_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; } diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index cad2caf..ae7e441 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -357,7 +357,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface This->overlay_destrect.right = X + w; This->overlay_destrect.bottom = Y + h; - IWineD3DSurface_DrawOverlay(iface); + This->surface_ops->surface_draw_overlay(This); return WINED3D_OK; } @@ -462,7 +462,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, con This->overlay_dest = NULL; } - IWineD3DSurface_DrawOverlay(iface); + This->surface_ops->surface_draw_overlay(This); return WINED3D_OK; } diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index c564285..9a729fb 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -95,9 +95,16 @@ static void gdi_surface_realize_palette(IWineD3DSurfaceImpl *surface) } } +static HRESULT gdi_surface_draw_overlay(IWineD3DSurfaceImpl *surface) +{ + FIXME("GDI surfaces can't draw overlays yet.\n"); + return E_FAIL; +} + static const struct wined3d_surface_ops gdi_surface_ops = { gdi_surface_realize_palette, + gdi_surface_draw_overlay, }; /***************************************************************************** @@ -439,11 +446,6 @@ static WINED3DSURFTYPE WINAPI IWineGDISurfaceImpl_GetImplType(IWineD3DSurface *i return SURFACE_GDI; } -static HRESULT WINAPI IWineGDISurfaceImpl_DrawOverlay(IWineD3DSurface *iface) { - FIXME("GDI surfaces can't draw overlays yet\n"); - return E_FAIL; -} - /* FIXME: This vtable should not use any IWineD3DSurface* implementation functions, * only IWineD3DBaseSurface and IWineGDISurface ones. */ @@ -491,5 +493,4 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = IWineD3DBaseSurfaceImpl_SetFormat, IWineGDISurfaceImpl_PrivateSetup, IWineGDISurfaceImpl_GetImplType, - IWineGDISurfaceImpl_DrawOverlay }; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 68e4734..96b845f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2091,6 +2091,7 @@ struct wined3d_subresource_container struct wined3d_surface_ops { void (*surface_realize_palette)(struct IWineD3DSurfaceImpl *surface); + HRESULT (*surface_draw_overlay)(struct IWineD3DSurfaceImpl *surface); }; /***************************************************************************** diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index b99fb4d..523d7fc 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -2467,8 +2467,6 @@ interface IWineD3DSurface : IWineD3DResource ); WINED3DSURFTYPE GetImplType( ); - HRESULT DrawOverlay( - ); } [
1
0
0
0
Henri Verbeet : wined3d: Remove IWineD3DSurface::RealizePalette() from the public interface.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 05603c45682a509b17eb9e9cc4a16ce0e0d496b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05603c45682a509b17eb9e9cc…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jan 24 11:19:37 2011 +0100 wined3d: Remove IWineD3DSurface::RealizePalette() from the public interface. --- dlls/wined3d/palette.c | 9 ++-- dlls/wined3d/surface.c | 114 +++++++++++++++++++++------------------- dlls/wined3d/surface_base.c | 5 +- dlls/wined3d/surface_gdi.c | 82 ++++++++++++++++------------- dlls/wined3d/wined3d_private.h | 6 ++ include/wine/wined3d.idl | 2 - 6 files changed, 119 insertions(+), 99 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=05603c45682a509b17eb9…
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200