Author: jimtabor
Date: Tue Mar 29 02:57:48 2011
New Revision: 51185
URL: http://svn.reactos.org/svn/reactos?rev=51185&view=rev
Log:
[Win32k]
- Finish object attribute support part 2.
- Removed DC from the list, ReactOS handles this in a different way. Comment out Brush and Pen switches until proper handling is implemented.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Tue Mar 29 02:57:48 2011
@@ -741,16 +741,22 @@
}
}
-
+/*
+ * Process Environment Cached GDI Handles
+ *
+ * What types of GDI handle objects that are cached in the GDI handle buffer?
+ * Brushes set to BS_SOLID, Pens with widths of zero or set to PS_SOLID, and
+ * Regions that are set to NULLREGION or SIMPLEREGION.
+ */
BOOL
FASTCALL
bPEBCacheHandle(HGDIOBJ Handle, int oType, PVOID pAttr)
{
PGDIHANDLECACHE GdiHandleCache;
HGDIOBJ *hPtr;
+ HANDLE Lock;
+ int Number, Offset, MaxNum = CACHE_PEN_ENTRIES;
BOOL Ret = FALSE;
- int Offset = 0, Number;
- HANDLE Lock;
GdiHandleCache = (PGDIHANDLECACHE)NtCurrentTeb()->ProcessEnvironmentBlock->GdiHandleBuffer;
@@ -758,6 +764,7 @@
{
case hctBrushHandle:
Offset = 0;
+ MaxNum = CACHE_BRUSH_ENTRIES;
break;
case hctPenHandle:
@@ -783,10 +790,10 @@
hPtr = GdiHandleCache->Handle + Offset;
- if ( pAttr && oType == hctRegionHandle)
+ if ( pAttr )
{
- if ( Number < CACHE_REGION_ENTRIES )
- {
+ if ( Number < MaxNum )
+ { // This object is cached and waiting for it's resurrection by the users.
((PRGN_ATTR)pAttr)->AttrFlags |= ATTR_CACHED;
hPtr[Number] = Handle;
GdiHandleCache->ulNumHandles[oType]++;
@@ -817,6 +824,7 @@
INT Index;
PGDI_TABLE_ENTRY Entry;
DWORD dwObjectType;
+ INT ihct;
PVOID pAttr = NULL;
DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject);
@@ -831,14 +839,27 @@
switch (dwObjectType)
{
case GDI_OBJECT_TYPE_BRUSH:
+ ihct = hctBrushHandle;
break;
+ case GDI_OBJECT_TYPE_PEN:
+ ihct = hctPenHandle;
+ break;
+
case GDI_OBJECT_TYPE_REGION:
- /* If pAttr NULL, the probability is high for System Region. */
+ ihct = hctRegionHandle;
+ break;
+ }
+
+ switch (dwObjectType)
+ {
+// case GDI_OBJECT_TYPE_BRUSH:
+// case GDI_OBJECT_TYPE_PEN:
+ case GDI_OBJECT_TYPE_REGION:
+ /* If pAttr NULL, the probability is high for System GDI handle object. */
if ( pAttr &&
- bPEBCacheHandle(hObject, hctRegionHandle, pAttr))
- {
- /* User space handle only! */
+ bPEBCacheHandle(hObject, ihct, pAttr) )
+ { /* User space handle only! */
return TRUE;
}
if (pAttr)
@@ -846,10 +867,6 @@
FreeObjectAttr(pAttr);
Entry->UserData = NULL;
}
- break;
-
- case GDI_OBJECT_TYPE_DC:
-// DC_FreeDcAttr(hObject);
break;
}
Author: tkreuzer
Date: Mon Mar 28 14:17:26 2011
New Revision: 51183
URL: http://svn.reactos.org/svn/reactos?rev=51183&view=rev
Log:
[CMAKE/AVIFIL32]
Move utf-8 resources back into rsrc.rc, move avifile_Bg.rc to the bottom. Fixes compilation with MSVC
Removed:
branches/cmake-bringup/dll/win32/avifil32/rsrc-utf8.rc
Modified:
branches/cmake-bringup/dll/win32/avifil32/CMakeLists.txt
branches/cmake-bringup/dll/win32/avifil32/rsrc.rc
Modified: branches/cmake-bringup/dll/win32/avifil32/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/avifil3…
==============================================================================
--- branches/cmake-bringup/dll/win32/avifil32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/avifil32/CMakeLists.txt [iso-8859-1] Mon Mar 28 14:17:26 2011
@@ -23,7 +23,6 @@
tmpfile.c
wavfile.c
rsrc.rc
- rsrc-utf8.rc
${CMAKE_CURRENT_BINARY_DIR}/avifil32.def)
set_module_type(avifil32 win32dll)
Removed: branches/cmake-bringup/dll/win32/avifil32/rsrc-utf8.rc
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/avifil3…
==============================================================================
--- branches/cmake-bringup/dll/win32/avifil32/rsrc-utf8.rc [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/avifil32/rsrc-utf8.rc (removed)
@@ -1,50 +1,0 @@
-/*
- * Top level resource file for avifil32.dll
- *
- * Copyright 2002 Michael Günnewig
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "avifile_private.h"
-
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-
-#define WINE_OLESELFREGISTER
-#define WINE_FILEDESCRIPTION_STR "Wine AVI file support library"
-#define WINE_FILENAME_STR "avifil32.dll"
-#define WINE_FILEVERSION 4,0,3,1998
-#define WINE_FILEVERSION_STR "4.03.1998"
-
-#include "wine/wine_common_ver.rc"
-
-/*
- * Everything specific to any language goes
- * in one of the specific files.
- */
-
-/* UTF-8 */
-#include "avifile_Bg.rc"
-#include "avifile_Da.rc"
-#include "avifile_De.rc"
-#include "avifile_Fr.rc"
-#include "avifile_Ja.rc"
-#include "avifile_Ko.rc"
-#include "avifile_Lt.rc"
-#include "avifile_Pt.rc"
-#include "avifile_Ro.rc"
-#include "avifile_Ru.rc"
-#include "avifile_Si.rc"
-#include "avifile_Zh.rc"
Modified: branches/cmake-bringup/dll/win32/avifil32/rsrc.rc
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/avifil3…
==============================================================================
--- branches/cmake-bringup/dll/win32/avifil32/rsrc.rc [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/avifil32/rsrc.rc [iso-8859-1] Mon Mar 28 14:17:26 2011
@@ -29,6 +29,7 @@
#define WINE_FILEVERSION_STR "4.03.1998"
#include "wine/wine_common_ver.rc"
+#include "avifile_private.h"
/*
* Everything specific to any language goes
@@ -46,3 +47,16 @@
#include "avifile_Tr.rc"
#include "avifile_Uk.rc"
+/* UTF-8 */
+#include "avifile_Da.rc"
+#include "avifile_De.rc"
+#include "avifile_Fr.rc"
+#include "avifile_Ja.rc"
+#include "avifile_Ko.rc"
+#include "avifile_Lt.rc"
+#include "avifile_Pt.rc"
+#include "avifile_Ro.rc"
+#include "avifile_Ru.rc"
+#include "avifile_Si.rc"
+#include "avifile_Zh.rc"
+#include "avifile_Bg.rc"