mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
adding doc for how DdCreateDirectDrawObject (GdiEntry1) and DdDeleteDirectDrawObject (GdiEntry3) works in reactos. doc by request by some devlopers
svn path=/trunk/; revision=21852
This commit is contained in:
parent
5a74450800
commit
f11806f4f0
6 changed files with 259 additions and 211 deletions
32
reactos/media/doc/DdCreateDirectDrawObject.txt
Normal file
32
reactos/media/doc/DdCreateDirectDrawObject.txt
Normal file
|
@ -0,0 +1,32 @@
|
|||
DdCreateDirectDrawObject
|
||||
|
||||
When IN HDC is not NULL
|
||||
1. we need check the IN HDC is NULL or not
|
||||
2. if it not null we need create a directdraw handler
|
||||
and store it to pDirectDrawGlobal->hDD
|
||||
3. if the directdraw handle is null return false
|
||||
we did fail to create directdraw HAL
|
||||
4. if the directdraw handle was not null we return true
|
||||
we did susses to create directdraw HAL
|
||||
|
||||
When IN HDC is NULL
|
||||
Now we come to if IN HDC is null basic we need create
|
||||
a hdc and cashe some data
|
||||
1. if internal cache of directdraw handle is not null (pDirectDrawGlobalInternal->hDD)
|
||||
we take it and fill to the public directdraw handler (pDirectDrawGlobal->hDD)
|
||||
and return susses.
|
||||
|
||||
2. if no internal cache of directdraw handle is found we need create it
|
||||
by using CreateDC for tempary HDC that will be cache in the win32k later
|
||||
|
||||
3. we need check see if we got a tempary HDC or not, if we fail getting tempary
|
||||
HDC return FALSE
|
||||
|
||||
4. Now we trying create directdraw handler it being cache to (pDirectDrawGlobalInternal->hDD)
|
||||
and it also set same handler to the public (pDirectDrawGlobal->hDD)
|
||||
5. if it fails to create directdraw handle return false
|
||||
we did fail to create directdraw HAL
|
||||
6. if it susses create directdraw handle return true
|
||||
we did susses to create directdraw HAL
|
||||
|
||||
To create a directdraw handler you need call the NtGdiDdCreateDirectDrawObject with a hdc
|
16
reactos/media/doc/DdDeleteDirectDrawObject.txt
Normal file
16
reactos/media/doc/DdDeleteDirectDrawObject.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
DdDeleteDirectDrawObject
|
||||
|
||||
we need release directdraw handler the cache or not cache handler
|
||||
1. check see if DirectDrawGlobal->hDD is NULL or not
|
||||
|
||||
2. if both cache directdraw handler and public handler is NULL
|
||||
then we need return false, fail to release it or it was already release
|
||||
|
||||
3. if public directdraw handler is not null we need release it
|
||||
and return if we susses or not.
|
||||
|
||||
4. we need check if we need rest the internal cache if public being release
|
||||
|
||||
|
||||
use NtGdiDdDeleteDirectDrawObject((HANDLE)DirectDrawGlobal->hDD);
|
||||
to release a directdraw handler.
|
Loading…
Reference in a new issue