ReactOS.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
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
List overview
Download
Ros-diffs
July 2006
----- 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
ros-diffs@reactos.org
19 participants
662 discussions
Start a n
N
ew thread
[mbosma] 23190: Add Trim function stub.
by mbosma@svn.reactos.org
Author: mbosma Date: Thu Jul 20 11:39:21 2006 New Revision: 23190 URL:
http://svn.reactos.org/svn/reactos?rev=23190&view=rev
Log: Add Trim function stub. Modified: branches/cache_manager_rewrite/cc/view.c Modified: branches/cache_manager_rewrite/cc/view.c URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/view.c…
============================================================================== --- branches/cache_manager_rewrite/cc/view.c (original) +++ branches/cache_manager_rewrite/cc/view.c Thu Jul 20 11:39:21 2006 @@ -97,6 +97,16 @@ return NULL; } +NTSTATUS +CcTrimMemory (ULONG Target, ULONG Priority, PULONG NrFreedPages) +{ + DPRINT1("Trim function for cache memory is not implemented yet.\n"); + + (*NrFreedPages) = 0; + + return STATUS_SUCCESS; +} + VOID INIT_FUNCTION NTAPI CcInitView (VOID) @@ -149,6 +159,8 @@ InsertTailList (&CcFreeCacheViewListHead, &CcCacheViewArray[i].ListEntry); Base = (PVOID) ((ULONG_PTR) Base + CACHE_VIEW_SIZE); } + + MmInitializeMemoryConsumer(MC_CACHE, CcTrimMemory); CcInitCacheZeroPage (); }
18 years, 5 months
1
0
0
0
[greatlrd] 23189: start spliting up my code. I been writing 1. DD_CALLBACKS code writen by me have been move to dd.c 2. follow DD_CALLBACKS api is working as they should NtGdiDdWaitForVerticalBlank, NtGdiDdCanCreateSurface, NtGdiDdGetScanLine 3. follow api does not working as it should, is it gdi32 problem or win32k problem for it ? NtGdiDdCreateSurface 4. Start rewriten surf callback and cleanup some code alot wrong with them. 5. start moving surface callback to ddsurf.c
by greatlrd@svn.reactos.org
Author: greatlrd Date: Thu Jul 20 11:23:21 2006 New Revision: 23189 URL:
http://svn.reactos.org/svn/reactos?rev=23189&view=rev
Log: start spliting up my code. I been writing 1. DD_CALLBACKS code writen by me have been move to dd.c 2. follow DD_CALLBACKS api is working as they should NtGdiDdWaitForVerticalBlank, NtGdiDdCanCreateSurface, NtGdiDdGetScanLine 3. follow api does not working as it should, is it gdi32 problem or win32k problem for it ? NtGdiDdCreateSurface 4. Start rewriten surf callback and cleanup some code alot wrong with them. 5. start moving surface callback to ddsurf.c Added: trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c (with props) trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c (with props) Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c trunk/reactos/subsystems/win32/win32k/win32k.rbuild Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/intddraw.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/intddraw.h Thu Jul 20 11:23:21 2006 @@ -11,7 +11,8 @@ #define GDI_OBJECT_TYPE_DD_MOTIONCOMP 0x00650000 typedef struct -{ +{ + HANDLE hDirectDrawLocal; DD_SURFACE_LOCAL Local; DD_SURFACE_MORE More; DD_SURFACE_GLOBAL Global; Added: trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c (added) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c Thu Jul 20 11:23:21 2006 @@ -1,0 +1,191 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Native DirectDraw implementation + * FILE: subsys/win32k/ntddraw/dd.c + * PROGRAMER: Magnus Olsen (greatlord(a)reactos.org) + * REVISION HISTORY: + * 19/7-2006 Magnus Olsen + */ + +#include <w32k.h> + +#define NDEBUG +#include <debug.h> + +#define DdHandleTable GdiHandleTable + +/* + DdMapMemory, DdDestroyDriver are not exported as NtGdi Call + This file is compelete for DD_CALLBACKS setup + + ToDO fix the NtGdiDdCreateSurface, shall we fix it + from GdiEntry or gdientry callbacks for DdCreateSurface + have we miss some thing there +*/ + +/************************************************************************/ +/* NtGdiDdCreateSurface */ +/* status : Bugs out */ +/************************************************************************/ + +DWORD STDCALL NtGdiDdCreateSurface( + HANDLE hDirectDrawLocal, + HANDLE *hSurface, + DDSURFACEDESC *puSurfaceDescription, + DD_SURFACE_GLOBAL *puSurfaceGlobalData, + DD_SURFACE_LOCAL *puSurfaceLocalData, + DD_SURFACE_MORE *puSurfaceMoreData, + PDD_CREATESURFACEDATA puCreateSurfaceData, + HANDLE *puhSurface +) +{ + DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; + PDD_DIRECTDRAW pDirectDraw; + PDD_DIRECTDRAW_GLOBAL lgpl; + + DPRINT1("NtGdiDdCreateSurface\n"); + + pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + + if (pDirectDraw != NULL) + { + + /* + FIXME Get the darn surface handle and and put all + surface struct to it + + FIXME rewrite the darn code complete + + FIXME fill the puCreateSurfaceData correct + + FIXME loading back info from it right + */ + + if ((pDirectDraw->DD.dwFlags & DDHAL_CB32_CREATESURFACE)) + { + /* backup the orignal PDev and info */ + lgpl = puCreateSurfaceData->lpDD; + + /* use our cache version instead */ + puCreateSurfaceData->lpDD = &pDirectDraw->Global; + + /* make the call */ + ddRVal = pDirectDraw->DD.CreateSurface(puCreateSurfaceData); + + /* But back the orignal PDev */ + puCreateSurfaceData->lpDD = lgpl; + + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); + } + + return ddRVal; +} + +/************************************************************************/ +/* NtGdiDdWaitForVerticalBlank */ +/* status : OK working as it should */ +/************************************************************************/ + + +DWORD STDCALL NtGdiDdWaitForVerticalBlank( + HANDLE hDirectDrawLocal, + PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData +) +{ + DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; + PDD_DIRECTDRAW_GLOBAL lgpl; + PDD_DIRECTDRAW pDirectDraw; + + DPRINT1("NtGdiDdWaitForVerticalBlank\n"); + + pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + + if (pDirectDraw != NULL) + { + if (pDirectDraw->DD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK) + { + lgpl = puWaitForVerticalBlankData->lpDD; + puWaitForVerticalBlankData->lpDD = &pDirectDraw->Global; + + ddRVal = pDirectDraw->DD.WaitForVerticalBlank(puWaitForVerticalBlankData); + + puWaitForVerticalBlankData->lpDD = lgpl; + } + GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); + } + + return ddRVal; +} + + +/************************************************************************/ +/* CanCreateSurface */ +/* status : OK working as it should */ +/************************************************************************/ + +DWORD STDCALL NtGdiDdCanCreateSurface( + HANDLE hDirectDrawLocal, + PDD_CANCREATESURFACEDATA puCanCreateSurfaceData +) +{ + DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; + PDD_DIRECTDRAW_GLOBAL lgpl; + + PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + + DPRINT1("NtGdiDdCanCreateSurface\n"); + + if (pDirectDraw != NULL) + { + + if (pDirectDraw->DD.dwFlags & DDHAL_CB32_CANCREATESURFACE) + { + lgpl = puCanCreateSurfaceData->lpDD; + puCanCreateSurfaceData->lpDD = &pDirectDraw->Global; + + ddRVal = pDirectDraw->DD.CanCreateSurface(puCanCreateSurfaceData); + + puCanCreateSurfaceData->lpDD = lgpl; + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); + } + + return ddRVal; +} + +/************************************************************************/ +/* GetScanLine */ +/* status : not implement, was undoc in msdn now it is doc */ +/************************************************************************/ +DWORD STDCALL +NtGdiDdGetScanLine( HANDLE hDirectDrawLocal, PDD_GETSCANLINEDATA puGetScanLineData) +{ + DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; + PDD_DIRECTDRAW_GLOBAL lgpl; + + PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + + DPRINT1("NtGdiDdGetScanLine\n"); + + if (pDirectDraw != NULL) + { + + if (pDirectDraw->DD.dwFlags & DDHAL_CB32_GETSCANLINE) + { + lgpl = puGetScanLineData->lpDD; + puGetScanLineData->lpDD = &pDirectDraw->Global; + + ddRVal = pDirectDraw->DD.GetScanLine(puGetScanLineData); + + puGetScanLineData->lpDD = lgpl; + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); + } + + return ddRVal; +} Propchange: trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Thu Jul 20 11:23:21 2006 @@ -316,255 +316,8 @@ return ddRVal; } -/************************************************************************/ -/* DD CALLBACKS */ -/* FIXME NtGdiDdCreateSurface we do not call to ddCreateSurface */ -/************************************************************************/ - -DWORD STDCALL NtGdiDdCreateSurface( - HANDLE hDirectDrawLocal, - HANDLE *hSurface, - DDSURFACEDESC *puSurfaceDescription, - DD_SURFACE_GLOBAL *puSurfaceGlobalData, - DD_SURFACE_LOCAL *puSurfaceLocalData, - DD_SURFACE_MORE *puSurfaceMoreData, - PDD_CREATESURFACEDATA puCreateSurfaceData, - HANDLE *puhSurface -) -{ - DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; - PDD_DIRECTDRAW pDirectDraw; - PDD_DIRECTDRAW_GLOBAL lgpl; - - DPRINT1("NtGdiDdCreateSurface\n"); - - pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); - - if (pDirectDraw != NULL) - { - - if ((pDirectDraw->DD.dwFlags & DDHAL_CB32_CREATESURFACE)) - { - /* backup the orignal PDev and info */ - lgpl = puCreateSurfaceData->lpDD; - - /* use our cache version instead */ - puCreateSurfaceData->lpDD = &pDirectDraw->Global; - - /* make the call */ - ddRVal = pDirectDraw->DD.CreateSurface(puCreateSurfaceData); - - /* But back the orignal PDev */ - puCreateSurfaceData->lpDD = lgpl; - } - - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); - } - - return ddRVal; -} - -DWORD STDCALL NtGdiDdWaitForVerticalBlank( - HANDLE hDirectDrawLocal, - PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData -) -{ - DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; - PDD_DIRECTDRAW_GLOBAL lgpl; - PDD_DIRECTDRAW pDirectDraw; - - DPRINT1("NtGdiDdWaitForVerticalBlank\n"); - - pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); - - if (pDirectDraw != NULL) - { - if (pDirectDraw->DD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK) - { - lgpl = puWaitForVerticalBlankData->lpDD; - puWaitForVerticalBlankData->lpDD = &pDirectDraw->Global; - - ddRVal = pDirectDraw->DD.WaitForVerticalBlank(puWaitForVerticalBlankData); - - puWaitForVerticalBlankData->lpDD = lgpl; - } - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); - } - - return ddRVal; -} - -DWORD STDCALL NtGdiDdCanCreateSurface( - HANDLE hDirectDrawLocal, - PDD_CANCREATESURFACEDATA puCanCreateSurfaceData -) -{ - DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; - PDD_DIRECTDRAW_GLOBAL lgpl; - - PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); - - DPRINT1("NtGdiDdCanCreateSurface\n"); - - if (pDirectDraw == NULL) - return DDHAL_DRIVER_NOTHANDLED; - - if (pDirectDraw != NULL) - { - - if (pDirectDraw->DD.dwFlags & DDHAL_CB32_CANCREATESURFACE) - { - lgpl = puCanCreateSurfaceData->lpDD; - puCanCreateSurfaceData->lpDD = &pDirectDraw->Global; - - ddRVal = pDirectDraw->DD.CanCreateSurface(puCanCreateSurfaceData); - - puCanCreateSurfaceData->lpDD = lgpl; - } - - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); - } - - return ddRVal; -} - -DWORD STDCALL NtGdiDdGetScanLine( - HANDLE hDirectDrawLocal, - PDD_GETSCANLINEDATA puGetScanLineData -) -{ - DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; - PDD_DIRECTDRAW_GLOBAL lgpl; - - PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); - - DPRINT1("NtGdiDdGetScanLine\n"); - - if (pDirectDraw != NULL) - { - if (pDirectDraw->DD.dwFlags & DDHAL_CB32_GETSCANLINE) - { - lgpl = puGetScanLineData->lpDD; - puGetScanLineData->lpDD = &pDirectDraw->Global; - - ddRVal = pDirectDraw->DD.GetScanLine(puGetScanLineData); - - puGetScanLineData->lpDD = lgpl; - } - - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); - } - - return ddRVal; -} - - - -/************************************************************************/ -/* Surface CALLBACKS */ -/* FIXME */ -/* NtGdiDdDestroySurface */ -/************************************************************************/ - -DWORD STDCALL NtGdiDdDestroySurface( - HANDLE hSurface, - BOOL bRealDestroy -) -{ - DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; - - PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DIRECTDRAW); - - DPRINT1("NtGdiDdDestroySurface\n"); - - if (pDirectDraw != NULL) - { - if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) - { - DD_DESTROYSURFACEDATA DestroySurf; - - /* FIXME - * bRealDestroy - * are we doing right ?? - */ - - DestroySurf.lpDD = &pDirectDraw->Global; - DestroySurf.lpDDSurface = hSurface; // ? - DestroySurf.DestroySurface = pDirectDraw->Surf.DestroySurface; - - ddRVal = pDirectDraw->Surf.DestroySurface(&DestroySurf); - } - - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); - } - - return ddRVal; -} - -DWORD STDCALL NtGdiDdFlip( - HANDLE hSurfaceCurrent, - HANDLE hSurfaceTarget, - HANDLE hSurfaceCurrentLeft, - HANDLE hSurfaceTargetLeft, - PDD_FLIPDATA puFlipData -) -{ - DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; - PDD_DIRECTDRAW_GLOBAL lgpl; - - PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurfaceTarget, GDI_OBJECT_TYPE_DIRECTDRAW); - - DPRINT1("NtGdiDdFlip\n"); - - - if (pDirectDraw != NULL) - { - if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_FLIP) - { - lgpl = puFlipData->lpDD; - puFlipData->lpDD = &pDirectDraw->Global; - - ddRVal = pDirectDraw->Surf.Flip(puFlipData); - - puFlipData->lpDD = lgpl; - } - - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); - } - - return ddRVal; -} - -DWORD STDCALL NtGdiDdLock( - HANDLE hSurface, - PDD_LOCKDATA puLockData, - HDC hdcClip -) -{ - DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; - PDD_DIRECTDRAW_GLOBAL lgpl; - - PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DIRECTDRAW); - - DPRINT1("NtGdiDdLock\n"); - - if (pDirectDraw != NULL) - { - if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_LOCK) - { - lgpl = puLockData->lpDD; - puLockData->lpDD = &pDirectDraw->Global; - - ddRVal = pDirectDraw->Surf.Lock(puLockData); - - puLockData->lpDD = lgpl; - } - - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); - } - - return ddRVal; -} + + DWORD STDCALL NtGdiDdUnlock( HANDLE hSurface, @@ -887,6 +640,8 @@ GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); return NULL; } + + pSurface->hDirectDrawLocal = hDirectDrawLocal; RtlMoveMemory(&pSurface->Local, puSurfaceLocal, sizeof(DD_SURFACE_LOCAL)); RtlMoveMemory(&pSurface->More, puSurfaceMore, sizeof(DD_SURFACE_MORE)); Added: trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c (added) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c Thu Jul 20 11:23:21 2006 @@ -1,0 +1,165 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Native DirectDraw implementation + * FILE: subsys/win32k/ntddraw/dd.c + * PROGRAMER: Magnus Olsen (greatlord(a)reactos.org) + * REVISION HISTORY: + * 19/7-2006 Magnus Olsen + */ + +#include <w32k.h> + +#define NDEBUG +#include <debug.h> + +#define DdHandleTable GdiHandleTable + + +/************************************************************************/ +/* NtGdiDdCreateSurface */ +/* status : untested */ +/************************************************************************/ +DWORD STDCALL NtGdiDdDestroySurface( + HANDLE hSurface, + BOOL bRealDestroy +) +{ + DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; + PDD_SURFACE pSurface; + PDD_DIRECTDRAW pDirectDraw; + DD_DESTROYSURFACEDATA DestroySurf; + + DPRINT1("NtGdiDdDestroySurface\n"); + + pSurface = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DD_SURFACE); + if (pSurface != NULL) + { + pDirectDraw = GDIOBJ_LockObj(DdHandleTable, pSurface->hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + if (pDirectDraw != NULL) + { + if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) + { + //DestroySurf.lpDD = pSurface->Global; + DestroySurf.lpDDSurface = hSurface; + + /* FIXME + in parma bRealDestroy + Specifies how to destroy the surface. Can be one of the following values. + TRUE = Destroy the surface and free video memory. + FALSE = Free the video memory but leave the surface in an uninitialized state + */ + + DestroySurf.DestroySurface = pDirectDraw->Surf.DestroySurface; + ddRVal = pDirectDraw->Surf.DestroySurface(&DestroySurf); + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pSurface); + } + + return ddRVal; +} + + + +/************************************************************************/ +/* NtGdiDdFlip */ +/* status : untested */ +/************************************************************************/ + +DWORD STDCALL NtGdiDdFlip( + HANDLE hSurfaceCurrent, + HANDLE hSurfaceTarget, + HANDLE hSurfaceCurrentLeft, + HANDLE hSurfaceTargetLeft, + PDD_FLIPDATA puFlipData +) +{ + DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; + PDD_SURFACE pSurface; + PDD_DIRECTDRAW pDirectDraw; + DPRINT1("NtGdiDdFlip\n"); + + /* DO we need looking all surface or is okay for one */ + pSurface = GDIOBJ_LockObj(DdHandleTable, hSurfaceCurrent, GDI_OBJECT_TYPE_DD_SURFACE); + if (pSurface != NULL) + { + pDirectDraw = GDIOBJ_LockObj(DdHandleTable, pSurface->hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + + if (pDirectDraw != NULL) + { + if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_FLIP) + { + /* FIXME is lpDD typecasted tp driver PEV ?? */ + ddRVal = pDirectDraw->Surf.Flip(puFlipData); + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pSurface); + } + + return ddRVal; +} + + + + +/************************************************************************/ +/* NtGdiDdLock */ +/* status : untested */ +/************************************************************************/ + +DWORD STDCALL NtGdiDdLock( + HANDLE hSurface, + PDD_LOCKDATA puLockData, + HDC hdcClip) +{ + DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED; + PDD_SURFACE pSurface; + PDD_DIRECTDRAW pDirectDraw; + + DPRINT1("NtGdiDdLock\n"); + + pSurface = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DD_SURFACE); + if (pSurface != NULL) + { + pDirectDraw = GDIOBJ_LockObj(DdHandleTable, pSurface->hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + + if (pDirectDraw != NULL) + { + /* Do we need lock hdc from hdcClip ?? */ + if (pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_LOCK) + { + /* FIXME is lpDD typecasted tp driver PEV ?? */ + ddRVal = pDirectDraw->Surf.Lock(puLockData); + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); + } + + GDIOBJ_UnlockObjByPtr(DdHandleTable, pSurface); + } + + return ddRVal; +} + +/* +00414 PDD_SURFCB_SETCLIPLIST SetClipList; +00416 PDD_SURFCB_UNLOCK Unlock; +00417 PDD_SURFCB_BLT Blt; +00418 PDD_SURFCB_SETCOLORKEY SetColorKey; +00419 PDD_SURFCB_ADDATTACHEDSURFACE AddAttachedSurface; +00420 PDD_SURFCB_GETBLTSTATUS GetBltStatus; +00421 PDD_SURFCB_GETFLIPSTATUS GetFlipStatus; +00422 PDD_SURFCB_UPDATEOVERLAY UpdateOverlay; +00423 PDD_SURFCB_SETOVERLAYPOSITION SetOverlayPosition; +00424 PVOID reserved4; +00425 PDD_SURFCB_SETPALETTE SetPalette; +00426 } DD_SURFACECALLBACKS, *PDD_SURFACECALLBACKS; +*/ + Propchange: trunk/reactos/subsystems/win32/win32k/ntddraw/ddsurf.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/win32k.rbuild (original) +++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild Thu Jul 20 11:23:21 2006 @@ -77,6 +77,8 @@ <directory name="ntddraw"> <compilationunit name="ntddraw.c"> <file>ddraw.c</file> + <file>dd.c</file> + <file>ddsurf.c</file> <file>stubs.c</file> </compilationunit> </directory>
18 years, 5 months
1
0
0
0
[hpoussin] 23188: Rename twain32.rbuild to twain_32.rbuild
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Jul 20 11:09:20 2006 New Revision: 23188 URL:
http://svn.reactos.org/svn/reactos?rev=23188&view=rev
Log: Rename twain32.rbuild to twain_32.rbuild Added: trunk/reactos/dll/win32/twain_32/twain_32.rbuild - copied unchanged from r23187, trunk/reactos/dll/win32/twain_32/twain32.rbuild Removed: trunk/reactos/dll/win32/twain_32/twain32.rbuild Removed: trunk/reactos/dll/win32/twain_32/twain32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/twain_32/twain32…
============================================================================== --- trunk/reactos/dll/win32/twain_32/twain32.rbuild (original) +++ trunk/reactos/dll/win32/twain_32/twain32.rbuild (removed) @@ -1,16 +1,0 @@ -<module name="twain_32" type="win32dll" baseaddress="${BASEADDRESS_TWAIN_32}" installbase="system32" installname="twain_32.dll" allowwarnings="true"> - <importlibrary definition="twain_32.def" /> - <include base="twain_32">.</include> - <define name="__USE_W32API" /> - <define name="_DISABLE_TIDENTS" /> - <library>wine</library> - <library>ntdll</library> - <library>kernel32</library> - <file>capability.c</file> - <file>ds_audio.c</file> - <file>ds_ctrl.c</file> - <file>ds_image.c</file> - <file>dsm_ctrl.c</file> - <file>twain32_main.c</file> - <file>twain_32.rc</file> -</module>
18 years, 5 months
1
0
0
0
[mbosma] 23187: - Only lock a FileObject using the Lock member for synchronous I/O. - Hardcode the sector size to 512 Thanks to Filip
by mbosma@svn.reactos.org
Author: mbosma Date: Thu Jul 20 10:58:07 2006 New Revision: 23187 URL:
http://svn.reactos.org/svn/reactos?rev=23187&view=rev
Log: - Only lock a FileObject using the Lock member for synchronous I/O. - Hardcode the sector size to 512 Thanks to Filip Modified: branches/cache_manager_rewrite/mm/section.c Modified: branches/cache_manager_rewrite/mm/section.c URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/sectio…
============================================================================== --- branches/cache_manager_rewrite/mm/section.c (original) +++ branches/cache_manager_rewrite/mm/section.c Thu Jul 20 10:58:07 2006 @@ -175,7 +175,10 @@ static NTSTATUS MmspWaitForFileLock(PFILE_OBJECT File) { - return KeWaitForSingleObject(&File->Lock, 0, KernelMode, FALSE, NULL); + if(File->Flags & FO_SYNCHRONOUS_IO) + return KeWaitForSingleObject(&File->Lock, 0, KernelMode, FALSE, NULL); + else + return 0; } @@ -900,20 +903,16 @@ ULONG Consumer) { NTSTATUS Status; - ULONG SectorSize; LARGE_INTEGER FileOffset; - ULONG Length, ReturnedLength; - + ULONG Length; + + ASSERT(SegOffset % 512 == 0); + ASSERT(SectionData->Segment->FileOffset % 512 == 0); + Status = MmspRequestPages(PageCount, Pages, Consumer); if (!NT_SUCCESS(Status)) { return Status; - } - - SectorSize = SectionData->Segment->BytesPerSector; - if (SectorSize == 0) - { - SectorSize = 512; } FileOffset.QuadPart = SegOffset + SectionData->Segment->FileOffset; @@ -922,46 +921,18 @@ { KEBUGCHECK(0); } - if (Length + SegOffset > SectionData->Segment->RawLength) - { - Length = SectionData->Segment->RawLength - SegOffset; - } - Status = MmspRawReadPages(SectionData->Section->FileObject, - SectorSize, + 512, &FileOffset, Length, Pages); - if (!NT_SUCCESS(Status) && SectionData->Segment->BytesPerSector == 0) - { - NTSTATUS tmpStatus; - FILE_FS_SIZE_INFORMATION FileFsSize; - - tmpStatus = IoQueryVolumeInformation(SectionData->Section->FileObject, - FileFsSizeInformation, - sizeof(FILE_FS_SIZE_INFORMATION), - &FileFsSize, - &ReturnedLength); - - if (NT_SUCCESS(tmpStatus)) - { - DPRINT("%d\n", FileFsSize.BytesPerSector); - SectionData->Segment->BytesPerSector = FileFsSize.BytesPerSector; - if (FileFsSize.BytesPerSector != 512) - { - Status = MmspRawReadPages(SectionData->Section->FileObject, - FileFsSize.BytesPerSector, - &FileOffset, - PageCount * PAGE_SIZE, - Pages); - } - } - } + if (!NT_SUCCESS(Status)) { MmspReleasePages(PageCount, Pages, Consumer); } + return Status; } @@ -3661,7 +3632,8 @@ Section->MaximumSize = MaximumSize; ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&DataSectionObjectLock); // CcRosReferenceCache(FileObject); - KeSetEvent((PVOID)&FileObject->Lock, IO_NO_INCREMENT, FALSE); + if(FileObject->Flags & FO_SYNCHRONOUS_IO) + KeSetEvent((PVOID)&FileObject->Lock, IO_NO_INCREMENT, FALSE); *SectionObject = Section; return(STATUS_SUCCESS); } @@ -4527,7 +4499,8 @@ } Section->FileObject = FileObject; // CcRosReferenceCache(FileObject); - KeSetEvent((PVOID)&FileObject->Lock, IO_NO_INCREMENT, FALSE); + if(FileObject->Flags & FO_SYNCHRONOUS_IO) + KeSetEvent((PVOID)&FileObject->Lock, IO_NO_INCREMENT, FALSE); *SectionObject = Section; DPRINT("%x\n", Section->AllocationAttributes); return STATUS_SUCCESS;
18 years, 5 months
1
0
0
0
[hpoussin] 23186: Delete now useless twain directory
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Jul 20 10:38:33 2006 New Revision: 23186 URL:
http://svn.reactos.org/svn/reactos?rev=23186&view=rev
Log: Delete now useless twain directory Removed: trunk/reactos/dll/win32/twain/
18 years, 5 months
1
0
0
0
[hpoussin] 23185: Forgot to commit this file with previous commit ; )
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Jul 20 10:27:35 2006 New Revision: 23185 URL:
http://svn.reactos.org/svn/reactos?rev=23185&view=rev
Log: Forgot to commit this file with previous commit ;) Modified: trunk/reactos/dll/win32/win32.rbuild Modified: trunk/reactos/dll/win32/win32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/win32.rbuild?rev…
============================================================================== --- trunk/reactos/dll/win32/win32.rbuild (original) +++ trunk/reactos/dll/win32/win32.rbuild Thu Jul 20 10:27:35 2006 @@ -220,8 +220,8 @@ <directory name="syssetup"> <xi:include href="syssetup/syssetup.rbuild" /> </directory> -<directory name="twain"> - <xi:include href="twain/twain_32.rbuild" /> +<directory name="twain_32"> + <xi:include href="twain_32/twain_32.rbuild" /> </directory> <directory name="urlmon"> <xi:include href="urlmon/urlmon.rbuild" />
18 years, 5 months
1
0
0
0
[hpoussin] 23184: Copy twain directory to twain_32
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Jul 20 10:26:09 2006 New Revision: 23184 URL:
http://svn.reactos.org/svn/reactos?rev=23184&view=rev
Log: Copy twain directory to twain_32 Added: trunk/reactos/dll/win32/twain_32/ - copied from r23123, trunk/reactos/dll/win32/twain/ Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff Thu Jul 20 10:26:09 2006 @@ -208,7 +208,7 @@ dll\win32\shlwapi\shlwapi.dll 1 dll\win32\smdll\smdll.dll 1 dll\win32\syssetup\syssetup.dll 1 -dll\win32\twain\twain_32.dll 1 +dll\win32\twain_32\twain_32.dll 1 dll\win32\urlmon\urlmon.dll 1 dll\win32\user32\user32.dll 1 dll\win32\userenv\userenv.dll 1
18 years, 5 months
1
0
0
0
[navaraf] 23183: Fix a bug in RtlMultiByteToUnicodeSize. Credits belong to whoever debugged it.
by navaraf@svn.reactos.org
Author: navaraf Date: Thu Jul 20 10:25:51 2006 New Revision: 23183 URL:
http://svn.reactos.org/svn/reactos?rev=23183&view=rev
Log: Fix a bug in RtlMultiByteToUnicodeSize. Credits belong to whoever debugged it. Modified: trunk/reactos/lib/rtl/nls.c Modified: trunk/reactos/lib/rtl/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/nls.c?rev=23183&r1…
============================================================================== --- trunk/reactos/lib/rtl/nls.c (original) +++ trunk/reactos/lib/rtl/nls.c Thu Jul 20 10:25:51 2006 @@ -285,18 +285,12 @@ { if (NlsLeadByteInfo[*(PUCHAR)MbString++]) { - if (!MbSize) - { - /* partial char, ignore it */ - Length++; - break; + if (MbSize) + { + /* Move on */ + MbSize--; + MbString++; } - } - else - { - /* Move on */ - MbSize--; - MbString++; } /* Increase returned size */
18 years, 5 months
1
0
0
0
[ion] 23181: - Fix for bug 1703. reported by gkrupa.
by ion@svn.reactos.org
Author: ion Date: Thu Jul 20 09:39:40 2006 New Revision: 23181 URL:
http://svn.reactos.org/svn/reactos?rev=23181&view=rev
Log: - Fix for bug 1703. reported by gkrupa. Modified: trunk/reactos/ntoskrnl/ke/main.c Modified: trunk/reactos/ntoskrnl/ke/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/main.c?rev=231…
============================================================================== --- trunk/reactos/ntoskrnl/ke/main.c (original) +++ trunk/reactos/ntoskrnl/ke/main.c Thu Jul 20 09:39:40 2006 @@ -158,7 +158,7 @@ CHAR* s; /* Copy the Loader Block Data locally since Low-Memory will be wiped */ - memcpy(&KeLoaderBlock, _LoaderBlock, sizeof(LOADER_PARAMETER_BLOCK)); + memcpy(&KeLoaderBlock, _LoaderBlock, sizeof(ROS_LOADER_PARAMETER_BLOCK)); memcpy(&KeLoaderModules[1], (PVOID)KeLoaderBlock.ModsAddr, sizeof(LOADER_MODULE) * KeLoaderBlock.ModsCount);
18 years, 5 months
1
0
0
0
[ion] 23180: [AUDIT] - 90% of the functions in this file are 1 line functions which set or get a value from ETHREAD. - The other 4 functions are related to User and System Thread Startup APCs, which are documented in gruesome detail and pseudo-code in Windows Internals 4 and Windows Internals II, as well as the main Thread Creation routine (PspCreateThread) which is one of the most well documented internal routines of NT. Code was developped in conjuction with WI4 and WI II.
by ion@svn.reactos.org
Author: ion Date: Thu Jul 20 09:37:12 2006 New Revision: 23180 URL:
http://svn.reactos.org/svn/reactos?rev=23180&view=rev
Log: [AUDIT] - 90% of the functions in this file are 1 line functions which set or get a value from ETHREAD. - The other 4 functions are related to User and System Thread Startup APCs, which are documented in gruesome detail and pseudo-code in Windows Internals 4 and Windows Internals II, as well as the main Thread Creation routine (PspCreateThread) which is one of the most well documented internal routines of NT. Code was developped in conjuction with WI4 and WI II. Modified: trunk/reactos/ntoskrnl/ps/thread.c (contents, props changed) Modified: trunk/reactos/ntoskrnl/ps/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/thread.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ps/thread.c (original) +++ trunk/reactos/ntoskrnl/ps/thread.c Thu Jul 20 09:37:12 2006 @@ -469,7 +469,7 @@ */ ULONG NTAPI -PsGetThreadFreezeCount(PETHREAD Thread) +PsGetThreadFreezeCount(IN PETHREAD Thread) { return Thread->Tcb.FreezeCount; } @@ -479,7 +479,7 @@ */ BOOLEAN NTAPI -PsGetThreadHardErrorsAreDisabled(PETHREAD Thread) +PsGetThreadHardErrorsAreDisabled(IN PETHREAD Thread) { return Thread->HardErrorsAreDisabled; } @@ -489,7 +489,7 @@ */ HANDLE NTAPI -PsGetThreadId(PETHREAD Thread) +PsGetThreadId(IN PETHREAD Thread) { return Thread->Cid.UniqueThread; } @@ -499,7 +499,7 @@ */ PEPROCESS NTAPI -PsGetThreadProcess(PETHREAD Thread) +PsGetThreadProcess(IN PETHREAD Thread) { return Thread->ThreadsProcess; } @@ -509,7 +509,7 @@ */ HANDLE NTAPI -PsGetThreadProcessId(PETHREAD Thread) +PsGetThreadProcessId(IN PETHREAD Thread) { return Thread->Cid.UniqueProcess; } @@ -519,7 +519,7 @@ */ HANDLE NTAPI -PsGetThreadSessionId(PETHREAD Thread) +PsGetThreadSessionId(IN PETHREAD Thread) { return (HANDLE)Thread->ThreadsProcess->Session; } @@ -529,7 +529,7 @@ */ PTEB NTAPI -PsGetThreadTeb(PETHREAD Thread) +PsGetThreadTeb(IN PETHREAD Thread) { return Thread->Tcb.Teb; } @@ -539,7 +539,7 @@ */ PVOID NTAPI -PsGetThreadWin32Thread(PETHREAD Thread) +PsGetThreadWin32Thread(IN PETHREAD Thread) { return Thread->Tcb.Win32Thread; } Propchange: trunk/reactos/ntoskrnl/ps/thread.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -*
18 years, 5 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
67
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
Results per page:
10
25
50
100
200