Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6cba8bf4
Commit
6cba8bf4
authored
Apr 16, 2001
by
Ove Kaaven
Committed by
Alexandre Julliard
Apr 16, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed CoerceDIBSection's AuxMod handling. Added CoerceDIBSection2.
parent
930b5092
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
dib.c
graphics/x11drv/dib.c
+22
-12
x11drv.h
include/x11drv.h
+1
-0
No files found.
graphics/x11drv/dib.c
View file @
6cba8bf4
...
...
@@ -3495,11 +3495,9 @@ INT X11DRV_DIB_Coerce(BITMAPOBJ *bmp, INT req, BOOL lossy)
case
DIB_Status_AuxMod
:
TRACE
(
"AppMod requested in status AuxMod
\n
"
);
X11DRV_DIB_DoProtectDIBSection
(
bmp
,
PAGE_READWRITE
);
if
(
lossy
)
dib
->
status
=
DIB_Status_AppMod
;
else
{
X11DRV_DIB_DoProtectDIBSection
(
bmp
,
PAGE_READWRITE
);
(
*
dib
->
copy_aux
)(
dib
->
aux_ctx
,
DIB_Status_AppMod
);
}
else
(
*
dib
->
copy_aux
)(
dib
->
aux_ctx
,
DIB_Status_AppMod
);
if
(
dib
->
status
!=
DIB_Status_GdiMod
)
break
;
/* fall through if copy_aux() had to change to GdiMod state */
...
...
@@ -3508,7 +3506,8 @@ INT X11DRV_DIB_Coerce(BITMAPOBJ *bmp, INT req, BOOL lossy)
TRACE
(
"AppMod requested in status GdiMod
\n
"
);
X11DRV_DIB_DoProtectDIBSection
(
bmp
,
PAGE_READWRITE
);
if
(
!
lossy
)
X11DRV_DIB_DoUpdateDIBSection
(
bmp
,
TRUE
);
/* fall through */
dib
->
status
=
DIB_Status_AppMod
;
break
;
case
DIB_Status_InSync
:
TRACE
(
"AppMod requested in status InSync
\n
"
);
...
...
@@ -3549,6 +3548,7 @@ INT X11DRV_DIB_Lock(BITMAPOBJ *bmp, INT req, BOOL lossy)
INT
ret
=
DIB_Status_None
;
if
(
dib
)
{
TRACE
(
"Locking %p from thread %08lx
\n
"
,
bmp
,
GetCurrentThreadId
());
EnterCriticalSection
(
&
(
dib
->
lock
));
ret
=
dib
->
status
;
if
(
req
!=
DIB_Status_None
)
...
...
@@ -3641,23 +3641,22 @@ void X11DRV_DIB_Unlock(BITMAPOBJ *bmp, BOOL commit)
break
;
}
LeaveCriticalSection
(
&
(
dib
->
lock
));
TRACE
(
"Unlocked %p
\n
"
,
bmp
);
}
}
/***********************************************************************
* X11DRV_CoerceDIBSection
* X11DRV_CoerceDIBSection
2
*/
INT
X11DRV_CoerceDIBSection
(
DC
*
dc
,
INT
req
,
BOOL
lossy
)
INT
X11DRV_CoerceDIBSection
2
(
HBITMAP
hBmp
,
INT
req
,
BOOL
lossy
)
{
BITMAPOBJ
*
bmp
;
INT
ret
;
if
(
!
dc
)
return
DIB_Status_None
;
if
(
!
(
dc
->
flags
&
DC_MEMORY
))
return
DIB_Status_None
;
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
dc
->
hBitmap
,
BITMAP_MAGIC
);
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hBmp
,
BITMAP_MAGIC
);
if
(
!
bmp
)
return
DIB_Status_None
;
ret
=
X11DRV_DIB_Coerce
(
bmp
,
req
,
lossy
);
GDI_ReleaseObj
(
dc
->
hBitma
p
);
GDI_ReleaseObj
(
hBm
p
);
return
ret
;
}
...
...
@@ -3670,6 +3669,7 @@ INT X11DRV_LockDIBSection2(HBITMAP hBmp, INT req, BOOL lossy)
INT
ret
;
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hBmp
,
BITMAP_MAGIC
);
if
(
!
bmp
)
return
DIB_Status_None
;
ret
=
X11DRV_DIB_Lock
(
bmp
,
req
,
lossy
);
GDI_ReleaseObj
(
hBmp
);
return
ret
;
...
...
@@ -3683,11 +3683,21 @@ void X11DRV_UnlockDIBSection2(HBITMAP hBmp, BOOL commit)
BITMAPOBJ
*
bmp
;
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hBmp
,
BITMAP_MAGIC
);
if
(
!
bmp
)
return
;
X11DRV_DIB_Unlock
(
bmp
,
commit
);
GDI_ReleaseObj
(
hBmp
);
}
/***********************************************************************
* X11DRV_CoerceDIBSection
*/
INT
X11DRV_CoerceDIBSection
(
DC
*
dc
,
INT
req
,
BOOL
lossy
)
{
if
(
!
dc
)
return
DIB_Status_None
;
return
X11DRV_CoerceDIBSection2
(
dc
->
hBitmap
,
req
,
lossy
);
}
/***********************************************************************
* X11DRV_LockDIBSection
*/
INT
X11DRV_LockDIBSection
(
DC
*
dc
,
INT
req
,
BOOL
lossy
)
...
...
include/x11drv.h
View file @
6cba8bf4
...
...
@@ -244,6 +244,7 @@ extern int *X11DRV_DIB_BuildColorMap( struct tagDC *dc, WORD coloruse,
extern
INT
X11DRV_CoerceDIBSection
(
struct
tagDC
*
dc
,
INT
,
BOOL
);
extern
INT
X11DRV_LockDIBSection
(
struct
tagDC
*
dc
,
INT
,
BOOL
);
extern
void
X11DRV_UnlockDIBSection
(
struct
tagDC
*
dc
,
BOOL
);
extern
INT
X11DRV_CoerceDIBSection2
(
HBITMAP
bmp
,
INT
,
BOOL
);
extern
INT
X11DRV_LockDIBSection2
(
HBITMAP
bmp
,
INT
,
BOOL
);
extern
void
X11DRV_UnlockDIBSection2
(
HBITMAP
bmp
,
BOOL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment