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
567340f0
Commit
567340f0
authored
May 25, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: XRender repeat mode is no longer needed in functions that use a DC.
parent
93758c43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
40 deletions
+10
-40
xrender.c
dlls/winex11.drv/xrender.c
+10
-40
No files found.
dlls/winex11.drv/xrender.c
View file @
567340f0
...
@@ -529,14 +529,6 @@ static void set_xrender_transformation(Picture src_pict, double xscale, double y
...
@@ -529,14 +529,6 @@ static void set_xrender_transformation(Picture src_pict, double xscale, double y
#endif
#endif
}
}
/* check if we can use repeating instead of scaling for the specified source DC */
static
BOOL
use_source_repeat
(
struct
xrender_physdev
*
dev
)
{
return
(
dev
->
x11dev
->
bitmap
&&
dev
->
x11dev
->
drawable_rect
.
right
-
dev
->
x11dev
->
drawable_rect
.
left
==
1
&&
dev
->
x11dev
->
drawable_rect
.
bottom
-
dev
->
x11dev
->
drawable_rect
.
top
==
1
);
}
static
void
update_xrender_clipping
(
struct
xrender_physdev
*
dev
,
HRGN
rgn
)
static
void
update_xrender_clipping
(
struct
xrender_physdev
*
dev
,
HRGN
rgn
)
{
{
XRenderPictureAttributes
pa
;
XRenderPictureAttributes
pa
;
...
@@ -1926,26 +1918,15 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
...
@@ -1926,26 +1918,15 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
{
{
int
x_dst
,
y_dst
;
int
x_dst
,
y_dst
;
Picture
src_pict
=
0
,
dst_pict
,
mask_pict
=
0
;
Picture
src_pict
=
0
,
dst_pict
,
mask_pict
=
0
;
BOOL
use_repeat
;
double
xscale
=
src
->
width
/
(
double
)
dst
->
width
;
double
xscale
,
yscale
;
double
yscale
=
src
->
height
/
(
double
)
dst
->
height
;
use_repeat
=
use_source_repeat
(
physdev_src
);
if
(
!
use_repeat
)
{
xscale
=
src
->
width
/
(
double
)
dst
->
width
;
yscale
=
src
->
height
/
(
double
)
dst
->
height
;
}
else
xscale
=
yscale
=
1
;
/* no scaling needed with a repeating source */
if
(
drawable
)
/* using an intermediate pixmap */
if
(
drawable
)
/* using an intermediate pixmap */
{
{
XRenderPictureAttributes
pa
;
x_dst
=
dst
->
x
;
x_dst
=
dst
->
x
;
y_dst
=
dst
->
y
;
y_dst
=
dst
->
y
;
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
,
0
,
NULL
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
}
}
else
else
...
@@ -1955,7 +1936,7 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
...
@@ -1955,7 +1936,7 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr
dst_pict
=
get_xrender_picture
(
physdev_dst
,
0
,
&
dst
->
visrect
);
dst_pict
=
get_xrender_picture
(
physdev_dst
,
0
,
&
dst
->
visrect
);
}
}
src_pict
=
get_xrender_picture_source
(
physdev_src
,
use_repeat
);
src_pict
=
get_xrender_picture_source
(
physdev_src
,
FALSE
);
/* mono -> color */
/* mono -> color */
if
(
physdev_src
->
format
==
WXR_FORMAT_MONO
&&
physdev_dst
->
format
!=
WXR_FORMAT_MONO
)
if
(
physdev_src
->
format
==
WXR_FORMAT_MONO
&&
physdev_dst
->
format
!=
WXR_FORMAT_MONO
)
...
@@ -1998,7 +1979,6 @@ static void xrender_put_image( Pixmap src_pixmap, Picture src_pict, Picture mask
...
@@ -1998,7 +1979,6 @@ static void xrender_put_image( Pixmap src_pixmap, Picture src_pict, Picture mask
{
{
int
x_dst
,
y_dst
;
int
x_dst
,
y_dst
;
Picture
dst_pict
;
Picture
dst_pict
;
XRenderPictureAttributes
pa
;
double
xscale
,
yscale
;
double
xscale
,
yscale
;
if
(
drawable
)
/* using an intermediate pixmap */
if
(
drawable
)
/* using an intermediate pixmap */
...
@@ -2008,9 +1988,8 @@ static void xrender_put_image( Pixmap src_pixmap, Picture src_pict, Picture mask
...
@@ -2008,9 +1988,8 @@ static void xrender_put_image( Pixmap src_pixmap, Picture src_pict, Picture mask
if
(
clip
)
clip_data
=
X11DRV_GetRegionData
(
clip
,
0
);
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
;
wine_tsx11_lock
();
wine_tsx11_lock
();
dst_pict
=
pXRenderCreatePicture
(
gdi_display
,
drawable
,
dst_format
,
CPRepeat
,
&
pa
);
dst_pict
=
pXRenderCreatePicture
(
gdi_display
,
drawable
,
dst_format
,
0
,
NULL
);
if
(
clip_data
)
if
(
clip_data
)
pXRenderSetPictureClipRectangles
(
gdi_display
,
dst_pict
,
0
,
0
,
pXRenderSetPictureClipRectangles
(
gdi_display
,
dst_pict
,
0
,
0
,
(
XRectangle
*
)
clip_data
->
Buffer
,
clip_data
->
rdh
.
nCount
);
(
XRectangle
*
)
clip_data
->
Buffer
,
clip_data
->
rdh
.
nCount
);
...
@@ -2280,7 +2259,6 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
...
@@ -2280,7 +2259,6 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
XRenderPictureAttributes
pa
;
XRenderPictureAttributes
pa
;
Pixmap
tmp_pixmap
=
0
;
Pixmap
tmp_pixmap
=
0
;
double
xscale
,
yscale
;
double
xscale
,
yscale
;
BOOL
use_repeat
;
if
(
src_dev
->
funcs
!=
dst_dev
->
funcs
)
if
(
src_dev
->
funcs
!=
dst_dev
->
funcs
)
{
{
...
@@ -2296,15 +2274,10 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
...
@@ -2296,15 +2274,10 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
dst_pict
=
get_xrender_picture
(
physdev_dst
,
0
,
&
dst
->
visrect
);
dst_pict
=
get_xrender_picture
(
physdev_dst
,
0
,
&
dst
->
visrect
);
use_repeat
=
use_source_repeat
(
physdev_src
);
xscale
=
src
->
width
/
(
double
)
dst
->
width
;
if
(
!
use_repeat
)
yscale
=
src
->
height
/
(
double
)
dst
->
height
;
{
xscale
=
src
->
width
/
(
double
)
dst
->
width
;
yscale
=
src
->
height
/
(
double
)
dst
->
height
;
}
else
xscale
=
yscale
=
1
;
/* no scaling needed with a repeating source */
src_pict
=
get_xrender_picture_source
(
physdev_src
,
use_repeat
);
src_pict
=
get_xrender_picture_source
(
physdev_src
,
FALSE
);
if
(
physdev_src
->
format
==
WXR_FORMAT_MONO
&&
physdev_dst
->
format
!=
WXR_FORMAT_MONO
)
if
(
physdev_src
->
format
==
WXR_FORMAT_MONO
&&
physdev_dst
->
format
!=
WXR_FORMAT_MONO
)
{
{
...
@@ -2321,9 +2294,7 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
...
@@ -2321,9 +2294,7 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
wine_tsx11_lock
();
wine_tsx11_lock
();
tmp_pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
width
,
height
,
tmp_pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
width
,
height
,
physdev_dst
->
pict_format
->
depth
);
physdev_dst
->
pict_format
->
depth
);
pa
.
repeat
=
use_repeat
?
RepeatNormal
:
RepeatNone
;
tmp_pict
=
pXRenderCreatePicture
(
gdi_display
,
tmp_pixmap
,
physdev_dst
->
pict_format
,
0
,
NULL
);
tmp_pict
=
pXRenderCreatePicture
(
gdi_display
,
tmp_pixmap
,
physdev_dst
->
pict_format
,
CPRepeat
,
&
pa
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
xrender_mono_blit
(
src_pict
,
tmp_pict
,
physdev_dst
->
format
,
&
fg
,
&
bg
,
xrender_mono_blit
(
src_pict
,
tmp_pict
,
physdev_dst
->
format
,
&
fg
,
&
bg
,
...
@@ -2337,9 +2308,8 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
...
@@ -2337,9 +2308,8 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
{
{
wine_tsx11_lock
();
wine_tsx11_lock
();
pa
.
subwindow_mode
=
IncludeInferiors
;
pa
.
subwindow_mode
=
IncludeInferiors
;
pa
.
repeat
=
use_repeat
?
RepeatNormal
:
RepeatNone
;
tmp_pict
=
pXRenderCreatePicture
(
gdi_display
,
physdev_src
->
x11dev
->
drawable
,
tmp_pict
=
pXRenderCreatePicture
(
gdi_display
,
physdev_src
->
x11dev
->
drawable
,
pict_formats
[
format
],
CPSubwindowMode
|
CPRepeat
,
&
pa
);
pict_formats
[
format
],
CPSubwindowMode
,
&
pa
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
}
}
}
}
...
...
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