Author: jgardou
Date: Mon Jul 23 12:19:30 2012
New Revision: 56949
URL:
http://svn.reactos.org/svn/reactos?rev=56949&view=rev
Log:
[WIN32SS/NTGDI]
- return default bitmap if no surface is attached to the DC
- clean up code a bit
Modified:
trunk/reactos/win32ss/gdi/ntgdi/dclife.c
trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/dclife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dclife.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dclife.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dclife.c [iso-8859-1] Mon Jul 23 12:19:30 2012
@@ -178,9 +178,6 @@
{
/* Non-direct DCs don't have a surface by default */
pdc->dclevel.pSurface = NULL;
-
- // FIXME: HACK, because our code expects a surface
- // pdc->dclevel.pSurface =
SURFACE_ShareLockSurface(StockObjects[DEFAULT_BITMAP]);
pdc->erclBounds.left = 0;
pdc->erclBounds.top = 0;
@@ -794,9 +791,6 @@
/* Allocate a dc attribute */
DC_bAllocDcAttr(pdcNew);
- // HACK!
- //DC_vSelectSurface(pdcNew, psurfDefaultBitmap);
-
DC_UnlockDc(pdcNew);
DPRINT("Leave NtGdiCreateCompatibleDC hdcNew = %p\n", hdcNew);
Modified: trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dcobjs.c [iso-8859-1] Mon Jul 23 12:19:30 2012
@@ -382,9 +382,6 @@
/* Default bitmap is 1x1 pixel */
pdc->dclevel.sizl.cx = 1;
pdc->dclevel.sizl.cy = 1;
-
- // HACK
- //psurfNew = SURFACE_ShareLockSurface(hbmp);
}
else
{
@@ -572,7 +569,7 @@
case GDI_OBJECT_TYPE_BITMAP:
{
SURFACE *psurf = pdc->dclevel.pSurface;
- SelObject = psurf ? psurf->BaseObject.hHmgr : NULL;
+ SelObject = psurf ? psurf->BaseObject.hHmgr :
StockObjects[DEFAULT_BITMAP];
break;
}