Author: tkreuzer
Date: Thu May 29 14:44:23 2008
New Revision: 33762
URL:
http://svn.reactos.org/svn/reactos?rev=33762&view=rev
Log:
remove hFirstBitmap from the WIN_DC_INFO struct, wasn't used anyway and use
StockObject(DEFAULT_BITMAP) for the default bitmap when creating a mem dc as on windows.
Modified:
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Thu May 29 14:44:23
2008
@@ -59,7 +59,6 @@
HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
HBITMAP hBitmap;
- HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */
/* #if 0 */
GdiPath path;
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Thu May 29 14:44:23
2008
@@ -60,7 +60,6 @@
{
PDC NewDC, OrigDC;
PDC_ATTR nDc_Attr, oDc_Attr;
- HBITMAP hBitmap;
HDC hNewDC, DisplayDC;
HRGN hVisRgn;
UNICODE_STRING DriverName;
@@ -118,21 +117,8 @@
nDc_Attr->ptlViewportOrg = oDc_Attr->ptlViewportOrg;
nDc_Attr->szlViewportExt = oDc_Attr->szlViewportExt;
- /* Create default bitmap */
- if (!(hBitmap = IntGdiCreateBitmap( 1, 1, 1, NewDC->w.bitsPerPixel, NULL )))
- {
- DC_UnlockDc( OrigDC );
- DC_UnlockDc( NewDC );
- DC_FreeDC( hNewDC );
- if (NULL != DisplayDC)
- {
- NtGdiDeleteObjectApp(DisplayDC);
- }
- return NULL;
- }
NewDC->DC_Type = DC_TYPE_MEMORY; // Always!
- NewDC->w.hBitmap = hBitmap;
- NewDC->w.hFirstBitmap = hBitmap;
+ NewDC->w.hBitmap = NtGdiGetStockObject(DEFAULT_BITMAP);
NewDC->pPDev = OrigDC->pPDev;
NewDC->DcLevel.hpal = OrigDC->DcLevel.hpal;
@@ -1024,10 +1010,6 @@
NtGdiSelectBrush (DCHandle, STOCK_WHITE_BRUSH);
NtGdiSelectFont (DCHandle, STOCK_SYSTEM_FONT);
DC_LockDC (DCHandle); NtGdiSelectXxx does not recognize stock objects yet */
- if (DCToDelete->DC_Type == DC_TYPE_MEMORY)
- {
- NtGdiDeleteObject (DCToDelete->w.hFirstBitmap);
- }
if (DCToDelete->XlateBrush != NULL)
EngDeleteXlate(DCToDelete->XlateBrush);
if (DCToDelete->XlatePen != NULL)
@@ -1042,9 +1024,9 @@
NtGdiDeleteObject (DCToDelete->w.hVisRgn);
}
if (NULL != DCToDelete->CombinedClip)
- {
- IntEngDeleteClipRegion(DCToDelete->CombinedClip);
- }
+ {
+ IntEngDeleteClipRegion(DCToDelete->CombinedClip);
+ }
if (DCToDelete->w.hGCClipRgn)
{
NtGdiDeleteObject (DCToDelete->w.hGCClipRgn);
@@ -1336,7 +1318,6 @@
nDc_Attr->hbrush = Dc_Attr->hbrush;
nDc_Attr->hlfntNew = Dc_Attr->hlfntNew;
newdc->w.hBitmap = dc->w.hBitmap;
- newdc->w.hFirstBitmap = dc->w.hFirstBitmap;
newdc->DcLevel.hpal = dc->DcLevel.hpal;
newdc->w.totalExtent = dc->w.totalExtent;
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
@@ -1405,8 +1386,6 @@
dc->DcLevel.flPath = dcs->DcLevel.flPath & ~DCPATH_SAVE;
- dc->w.hFirstBitmap = dcs->w.hFirstBitmap;
-
Dc_Attr->dwLayout = sDc_Attr->dwLayout;
dc->w.totalExtent = dcs->w.totalExtent;
Dc_Attr->jROP2 = sDc_Attr->jROP2;