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
cf4cd297
Commit
cf4cd297
authored
Sep 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Explicitly clip to the visible rect when using the XRender SRCCOPY optimization.
parent
6025d9b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
xrender.c
dlls/winex11.drv/xrender.c
+17
-3
No files found.
dlls/winex11.drv/xrender.c
View file @
cf4cd297
...
@@ -2333,7 +2333,7 @@ static void get_colors( struct xrender_physdev *physdev_src, struct xrender_phys
...
@@ -2333,7 +2333,7 @@ static void get_colors( struct xrender_physdev *physdev_src, struct xrender_phys
}
}
static
void
xrender_stretch_blit
(
struct
xrender_physdev
*
physdev_src
,
struct
xrender_physdev
*
physdev_dst
,
static
void
xrender_stretch_blit
(
struct
xrender_physdev
*
physdev_src
,
struct
xrender_physdev
*
physdev_dst
,
Drawable
drawable
,
const
struct
bitblt_coords
*
src
,
Drawable
drawable
,
HRGN
clip
,
const
struct
bitblt_coords
*
src
,
const
struct
bitblt_coords
*
dst
)
const
struct
bitblt_coords
*
dst
)
{
{
int
width
=
abs
(
dst
->
width
);
int
width
=
abs
(
dst
->
width
);
...
@@ -2344,6 +2344,7 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
...
@@ -2344,6 +2344,7 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
Picture
src_pict
=
0
,
dst_pict
,
mask_pict
=
0
;
Picture
src_pict
=
0
,
dst_pict
,
mask_pict
=
0
;
BOOL
use_repeat
;
BOOL
use_repeat
;
double
xscale
,
yscale
;
double
xscale
,
yscale
;
RGNDATA
*
clip_data
=
NULL
;
use_repeat
=
use_source_repeat
(
physdev_src
);
use_repeat
=
use_source_repeat
(
physdev_src
);
if
(
!
use_repeat
)
if
(
!
use_repeat
)
...
@@ -2357,11 +2358,15 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
...
@@ -2357,11 +2358,15 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
{
{
XRenderPictureAttributes
pa
;
XRenderPictureAttributes
pa
;
if
(
clip
)
clip_data
=
X11DRV_GetRegionData
(
clip
,
0
);
x_dst
=
dst
->
x
;
x_dst
=
dst
->
x
;
y_dst
=
dst
->
y
;
y_dst
=
dst
->
y
;
pa
.
repeat
=
RepeatNone
;
pa
.
repeat
=
RepeatNone
;
wine_tsx11_lock
();
wine_tsx11_lock
();
dst_pict
=
pXRenderCreatePicture
(
gdi_display
,
drawable
,
physdev_dst
->
pict_format
,
CPRepeat
,
&
pa
);
dst_pict
=
pXRenderCreatePicture
(
gdi_display
,
drawable
,
physdev_dst
->
pict_format
,
CPRepeat
,
&
pa
);
if
(
clip_data
)
pXRenderSetPictureClipRectangles
(
gdi_display
,
dst_pict
,
0
,
0
,
(
XRectangle
*
)
clip_data
->
Buffer
,
clip_data
->
rdh
.
nCount
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
}
}
else
else
...
@@ -2369,6 +2374,7 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
...
@@ -2369,6 +2374,7 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
x_dst
=
physdev_dst
->
x11dev
->
dc_rect
.
left
+
dst
->
x
;
x_dst
=
physdev_dst
->
x11dev
->
dc_rect
.
left
+
dst
->
x
;
y_dst
=
physdev_dst
->
x11dev
->
dc_rect
.
top
+
dst
->
y
;
y_dst
=
physdev_dst
->
x11dev
->
dc_rect
.
top
+
dst
->
y
;
dst_pict
=
get_xrender_picture
(
physdev_dst
);
dst_pict
=
get_xrender_picture
(
physdev_dst
);
if
(
clip
)
clip_data
=
add_xrender_clipping_region
(
physdev_dst
,
clip
);
}
}
if
(
src
->
width
<
0
)
x_src
+=
src
->
width
+
1
;
if
(
src
->
width
<
0
)
x_src
+=
src
->
width
+
1
;
...
@@ -2421,6 +2427,9 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
...
@@ -2421,6 +2427,9 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
pXRenderFreePicture
(
gdi_display
,
dst_pict
);
pXRenderFreePicture
(
gdi_display
,
dst_pict
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
}
}
else
update_xrender_clipping
(
physdev_dst
,
clip_data
);
HeapFree
(
GetProcessHeap
(),
0
,
clip_data
);
}
}
...
@@ -2485,7 +2494,7 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
...
@@ -2485,7 +2494,7 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
tmp
.
visrect
.
bottom
-
tmp
.
visrect
.
top
,
physdev_dst
->
x11dev
->
depth
);
tmp
.
visrect
.
bottom
-
tmp
.
visrect
.
top
,
physdev_dst
->
x11dev
->
depth
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
xrender_stretch_blit
(
physdev_src
,
physdev_dst
,
tmp_pixmap
,
src
,
&
tmp
);
xrender_stretch_blit
(
physdev_src
,
physdev_dst
,
tmp_pixmap
,
0
,
src
,
&
tmp
);
execute_rop
(
physdev_dst
->
x11dev
,
tmp_pixmap
,
tmpGC
,
&
dst
->
visrect
,
rop
);
execute_rop
(
physdev_dst
->
x11dev
,
tmp_pixmap
,
tmpGC
,
&
dst
->
visrect
,
rop
);
wine_tsx11_lock
();
wine_tsx11_lock
();
...
@@ -2493,7 +2502,12 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
...
@@ -2493,7 +2502,12 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
XFreeGC
(
gdi_display
,
tmpGC
);
XFreeGC
(
gdi_display
,
tmpGC
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
}
}
else
xrender_stretch_blit
(
physdev_src
,
physdev_dst
,
0
,
src
,
dst
);
else
{
HRGN
rgn
=
CreateRectRgnIndirect
(
&
dst
->
visrect
);
xrender_stretch_blit
(
physdev_src
,
physdev_dst
,
0
,
rgn
,
src
,
dst
);
DeleteObject
(
rgn
);
}
if
(
physdev_dst
!=
physdev_src
)
X11DRV_UnlockDIBSection
(
physdev_src
->
x11dev
,
FALSE
);
if
(
physdev_dst
!=
physdev_src
)
X11DRV_UnlockDIBSection
(
physdev_src
->
x11dev
,
FALSE
);
X11DRV_UnlockDIBSection
(
physdev_dst
->
x11dev
,
TRUE
);
X11DRV_UnlockDIBSection
(
physdev_dst
->
x11dev
,
TRUE
);
...
...
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