Remove optimization (not thread-safe)

svn path=/trunk/; revision=7008
This commit is contained in:
Gé van Geldorp 2003-12-13 23:26:04 +00:00
parent 0d9840021e
commit 44123858ae

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: dc.c,v 1.112 2003/12/13 19:27:10 weiden Exp $ /* $Id: dc.c,v 1.113 2003/12/13 23:26:04 gvg Exp $
* *
* DC.C - Device context functions * DC.C - Device context functions
* *
@ -142,9 +142,6 @@ NtGdiCreateCompatableDC(HDC hDC)
DisplayDC = NULL; DisplayDC = NULL;
if (hDC == NULL) if (hDC == NULL)
{
hDC = IntGetScreenDC();
if (NULL == hDC)
{ {
RtlInitUnicodeString(&DriverName, L"DISPLAY"); RtlInitUnicodeString(&DriverName, L"DISPLAY");
DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL); DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL);
@ -154,7 +151,6 @@ NtGdiCreateCompatableDC(HDC hDC)
} }
hDC = DisplayDC; hDC = DisplayDC;
} }
}
/* Allocate a new DC based on the original DC's device */ /* Allocate a new DC based on the original DC's device */
OrigDC = DC_LockDc(hDC); OrigDC = DC_LockDc(hDC);
@ -170,6 +166,7 @@ NtGdiCreateCompatableDC(HDC hDC)
if (NULL == hNewDC) if (NULL == hNewDC)
{ {
DC_UnlockDc(hDC);
if (NULL != DisplayDC) if (NULL != DisplayDC)
{ {
NtGdiDeleteDC(DisplayDC); NtGdiDeleteDC(DisplayDC);