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
6d027e1f
Commit
6d027e1f
authored
Jun 11, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added counter for operations generating graphics exposures to the DC
struct, to avoid waiting for expose events when none were generated.
parent
172cd1b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
29 deletions
+49
-29
bitblt.c
graphics/x11drv/bitblt.c
+22
-7
clipping.c
graphics/x11drv/clipping.c
+26
-22
x11drv.h
include/x11drv.h
+1
-0
No files found.
graphics/x11drv/bitblt.c
View file @
6d027e1f
...
...
@@ -826,7 +826,7 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
* Retrieve an area from the source DC, stretching and mapping all the
* pixels to Windows colors.
*/
static
void
BITBLT_GetSrcAreaStretch
(
DC
*
dcSrc
,
DC
*
dcDst
,
static
int
BITBLT_GetSrcAreaStretch
(
DC
*
dcSrc
,
DC
*
dcDst
,
Pixmap
pixmap
,
GC
gc
,
INT
xSrc
,
INT
ySrc
,
INT
widthSrc
,
INT
heightSrc
,
...
...
@@ -872,6 +872,7 @@ static void BITBLT_GetSrcAreaStretch( DC *dcSrc, DC *dcDst,
rectDst
.
right
-
rectDst
.
left
,
rectDst
.
bottom
-
rectDst
.
top
);
XDestroyImage
(
imageSrc
);
XDestroyImage
(
imageDst
);
return
0
;
/* no exposure events generated */
}
...
...
@@ -881,11 +882,12 @@ static void BITBLT_GetSrcAreaStretch( DC *dcSrc, DC *dcDst,
* Retrieve an area from the source DC, mapping all the
* pixels to Windows colors.
*/
static
void
BITBLT_GetSrcArea
(
DC
*
dcSrc
,
DC
*
dcDst
,
Pixmap
pixmap
,
GC
gc
,
INT
xSrc
,
INT
ySrc
,
RECT
*
visRectSrc
)
static
int
BITBLT_GetSrcArea
(
DC
*
dcSrc
,
DC
*
dcDst
,
Pixmap
pixmap
,
GC
gc
,
INT
xSrc
,
INT
ySrc
,
RECT
*
visRectSrc
)
{
XImage
*
imageSrc
,
*
imageDst
;
register
INT
x
,
y
;
int
exposures
=
0
;
INT
width
=
visRectSrc
->
right
-
visRectSrc
->
left
;
INT
height
=
visRectSrc
->
bottom
-
visRectSrc
->
top
;
X11DRV_PDEVICE
*
physDevSrc
=
(
X11DRV_PDEVICE
*
)
dcSrc
->
physDev
;
...
...
@@ -911,6 +913,7 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
else
XCopyArea
(
gdi_display
,
physDevSrc
->
drawable
,
pixmap
,
gc
,
visRectSrc
->
left
,
visRectSrc
->
top
,
width
,
height
,
0
,
0
);
exposures
++
;
}
else
/* color -> color */
{
...
...
@@ -924,6 +927,7 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
XCopyArea
(
gdi_display
,
physDevSrc
->
drawable
,
pixmap
,
gc
,
visRectSrc
->
left
,
visRectSrc
->
top
,
width
,
height
,
0
,
0
);
exposures
++
;
imageSrc
=
XGetImage
(
gdi_display
,
pixmap
,
0
,
0
,
width
,
height
,
AllPlanes
,
ZPixmap
);
}
...
...
@@ -955,6 +959,7 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
XCopyPlane
(
gdi_display
,
physDevSrc
->
drawable
,
pixmap
,
gc
,
visRectSrc
->
left
,
visRectSrc
->
top
,
width
,
height
,
0
,
0
,
1
);
exposures
++
;
}
else
/* color -> monochrome */
{
...
...
@@ -973,6 +978,7 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
XDestroyImage
(
imageDst
);
}
}
return
exposures
;
}
...
...
@@ -982,8 +988,9 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
* Retrieve an area from the destination DC, mapping all the
* pixels to Windows colors.
*/
static
void
BITBLT_GetDstArea
(
DC
*
dc
,
Pixmap
pixmap
,
GC
gc
,
RECT
*
visRectDst
)
static
int
BITBLT_GetDstArea
(
DC
*
dc
,
Pixmap
pixmap
,
GC
gc
,
RECT
*
visRectDst
)
{
int
exposures
=
0
;
INT
width
=
visRectDst
->
right
-
visRectDst
->
left
;
INT
height
=
visRectDst
->
bottom
-
visRectDst
->
top
;
X11DRV_PDEVICE
*
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
...
...
@@ -993,6 +1000,7 @@ static void BITBLT_GetDstArea(DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst)
{
XCopyArea
(
gdi_display
,
physDev
->
drawable
,
pixmap
,
gc
,
visRectDst
->
left
,
visRectDst
->
top
,
width
,
height
,
0
,
0
);
exposures
++
;
}
else
{
...
...
@@ -1008,6 +1016,7 @@ static void BITBLT_GetDstArea(DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst)
/* Make sure we don't get a BadMatch error */
XCopyArea
(
gdi_display
,
physDev
->
drawable
,
pixmap
,
gc
,
visRectDst
->
left
,
visRectDst
->
top
,
width
,
height
,
0
,
0
);
exposures
++
;
image
=
XGetImage
(
gdi_display
,
pixmap
,
0
,
0
,
width
,
height
,
AllPlanes
,
ZPixmap
);
}
...
...
@@ -1018,6 +1027,7 @@ static void BITBLT_GetDstArea(DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst)
XPutImage
(
gdi_display
,
pixmap
,
gc
,
image
,
0
,
0
,
0
,
0
,
width
,
height
);
XDestroyImage
(
image
);
}
return
exposures
;
}
...
...
@@ -1027,8 +1037,9 @@ static void BITBLT_GetDstArea(DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst)
* Put an area back into the destination DC, mapping the pixel
* colors to X pixels.
*/
static
void
BITBLT_PutDstArea
(
DC
*
dc
,
Pixmap
pixmap
,
GC
gc
,
RECT
*
visRectDst
)
static
int
BITBLT_PutDstArea
(
DC
*
dc
,
Pixmap
pixmap
,
GC
gc
,
RECT
*
visRectDst
)
{
int
exposures
=
0
;
INT
width
=
visRectDst
->
right
-
visRectDst
->
left
;
INT
height
=
visRectDst
->
bottom
-
visRectDst
->
top
;
X11DRV_PDEVICE
*
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
...
...
@@ -1040,6 +1051,7 @@ static void BITBLT_PutDstArea(DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst)
{
XCopyArea
(
gdi_display
,
pixmap
,
physDev
->
drawable
,
gc
,
0
,
0
,
width
,
height
,
visRectDst
->
left
,
visRectDst
->
top
);
exposures
++
;
}
else
{
...
...
@@ -1056,6 +1068,7 @@ static void BITBLT_PutDstArea(DC *dc, Pixmap pixmap, GC gc, RECT *visRectDst)
visRectDst
->
left
,
visRectDst
->
top
,
width
,
height
);
XDestroyImage
(
image
);
}
return
exposures
;
}
...
...
@@ -1311,6 +1324,7 @@ static BOOL BITBLT_InternalStretchBlt( DC *dcDst, INT xDst, INT yDst,
physDevDst
->
drawable
,
physDevDst
->
gc
,
visRectSrc
.
left
,
visRectSrc
.
top
,
width
,
height
,
visRectDst
.
left
,
visRectDst
.
top
);
physDevDst
->
exposures
++
;
return
TRUE
;
}
if
(
dcSrc
->
bitsPerPixel
==
1
)
...
...
@@ -1322,6 +1336,7 @@ static BOOL BITBLT_InternalStretchBlt( DC *dcDst, INT xDst, INT yDst,
physDevDst
->
drawable
,
physDevDst
->
gc
,
visRectSrc
.
left
,
visRectSrc
.
top
,
width
,
height
,
visRectDst
.
left
,
visRectDst
.
top
,
1
);
physDevDst
->
exposures
++
;
return
TRUE
;
}
break
;
...
...
@@ -1408,8 +1423,8 @@ static BOOL BITBLT_InternalStretchBlt( DC *dcDst, INT xDst, INT yDst,
}
}
XSetFunction
(
gdi_display
,
physDevDst
->
gc
,
GXcopy
);
BITBLT_PutDstArea
(
dcDst
,
pixmaps
[
destUsed
?
DST
:
SRC
],
physDevDst
->
gc
,
&
visRectDst
);
physDevDst
->
exposures
+=
BITBLT_PutDstArea
(
dcDst
,
pixmaps
[
destUsed
?
DST
:
SRC
],
physDevDst
->
gc
,
&
visRectDst
);
XFreePixmap
(
gdi_display
,
pixmaps
[
DST
]
);
if
(
pixmaps
[
SRC
])
XFreePixmap
(
gdi_display
,
pixmaps
[
SRC
]
);
if
(
pixmaps
[
TMP
])
XFreePixmap
(
gdi_display
,
pixmaps
[
TMP
]
);
...
...
graphics/x11drv/clipping.c
View file @
6d027e1f
...
...
@@ -117,6 +117,7 @@ void X11DRV_StartGraphicsExposures( HDC hdc )
{
X11DRV_PDEVICE
*
physDev
=
dc
->
physDev
;
TSXSetGraphicsExposures
(
gdi_display
,
physDev
->
gc
,
True
);
physDev
->
exposures
=
0
;
GDI_ReleaseObj
(
hdc
);
}
}
...
...
@@ -140,31 +141,34 @@ void X11DRV_EndGraphicsExposures( HDC hdc, HRGN hrgn )
SetRectRgn
(
hrgn
,
0
,
0
,
0
,
0
);
wine_tsx11_lock
();
XSetGraphicsExposures
(
gdi_display
,
physDev
->
gc
,
False
);
XSync
(
gdi_display
,
False
);
for
(;;)
if
(
physDev
->
exposures
)
{
XWindowEvent
(
gdi_display
,
physDev
->
drawable
,
~
0
,
&
event
);
if
(
event
.
type
==
NoExpose
)
break
;
if
(
event
.
type
==
GraphicsExpose
)
XSync
(
gdi_display
,
False
);
for
(;;)
{
TRACE
(
"got %d,%d %dx%d count %d
\n
"
,
event
.
xgraphicsexpose
.
x
,
event
.
xgraphicsexpose
.
y
,
event
.
xgraphicsexpose
.
width
,
event
.
xgraphicsexpose
.
height
,
event
.
xgraphicsexpose
.
count
);
if
(
!
tmp
)
tmp
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
SetRectRgn
(
tmp
,
event
.
xgraphicsexpose
.
x
,
event
.
xgraphicsexpose
.
y
,
event
.
xgraphicsexpose
.
x
+
event
.
xgraphicsexpose
.
width
,
event
.
xgraphicsexpose
.
y
+
event
.
xgraphicsexpose
.
height
);
CombineRgn
(
hrgn
,
hrgn
,
tmp
,
RGN_OR
);
if
(
!
event
.
xgraphicsexpose
.
count
)
break
;
XWindowEvent
(
gdi_display
,
physDev
->
drawable
,
~
0
,
&
event
);
if
(
event
.
type
==
NoExpose
)
break
;
if
(
event
.
type
==
GraphicsExpose
)
{
TRACE
(
"got %d,%d %dx%d count %d
\n
"
,
event
.
xgraphicsexpose
.
x
,
event
.
xgraphicsexpose
.
y
,
event
.
xgraphicsexpose
.
width
,
event
.
xgraphicsexpose
.
height
,
event
.
xgraphicsexpose
.
count
);
if
(
!
tmp
)
tmp
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
SetRectRgn
(
tmp
,
event
.
xgraphicsexpose
.
x
,
event
.
xgraphicsexpose
.
y
,
event
.
xgraphicsexpose
.
x
+
event
.
xgraphicsexpose
.
width
,
event
.
xgraphicsexpose
.
y
+
event
.
xgraphicsexpose
.
height
);
CombineRgn
(
hrgn
,
hrgn
,
tmp
,
RGN_OR
);
if
(
!
event
.
xgraphicsexpose
.
count
)
break
;
}
else
{
ERR
(
"got unexpected event %d
\n
"
,
event
.
type
);
break
;
}
if
(
tmp
)
DeleteObject
(
tmp
);
}
else
{
ERR
(
"got unexpected event %d
\n
"
,
event
.
type
);
break
;
}
if
(
tmp
)
DeleteObject
(
tmp
);
}
wine_tsx11_unlock
();
GDI_ReleaseObj
(
hdc
);
...
...
include/x11drv.h
View file @
6d027e1f
...
...
@@ -68,6 +68,7 @@ typedef struct
X_PHYSBRUSH
brush
;
int
backgroundPixel
;
int
textPixel
;
int
exposures
;
/* count of graphics exposures operations */
XVisualInfo
*
visuals
[
MAX_PIXELFORMATS
];
int
used_visuals
;
int
current_pf
;
...
...
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