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
9eaf6a29
Commit
9eaf6a29
authored
May 20, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
May 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Optimize AlphaBlend of 1x1 source bitmaps.
parent
cdf8aeb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
xrender.c
dlls/winex11.drv/xrender.c
+10
-4
No files found.
dlls/winex11.drv/xrender.c
View file @
9eaf6a29
...
...
@@ -1631,6 +1631,7 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
BOOL
top_down
=
FALSE
;
RGNDATA
*
rgndata
;
enum
drawable_depth_type
dst_depth_type
=
(
devDst
->
depth
==
1
)
?
mono_drawable
:
color_drawable
;
int
repeat_src
;
if
(
!
X11DRV_XRender_Installed
)
{
FIXME
(
"Unable to AlphaBlend without Xrender
\n
"
);
...
...
@@ -1657,10 +1658,14 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
heightSrc
=
pts
[
1
].
y
-
pts
[
0
].
y
;
if
(
!
widthDst
||
!
heightDst
||
!
widthSrc
||
!
heightSrc
)
return
TRUE
;
/* If the source is a 1x1 bitmap, tiling is equivalent to stretching, but
tiling is much faster. Therefore, we do no stretching in this case. */
repeat_src
=
widthSrc
==
1
&&
heightSrc
==
1
;
#ifndef HAVE_XRENDERSETPICTURETRANSFORM
if
(
widthDst
!=
widthSrc
||
heightDst
!=
heightS
rc
)
if
(
(
widthDst
!=
widthSrc
||
heightDst
!=
heightSrc
)
&&
!
repeat_s
rc
)
#else
if
(
!
pXRenderSetPictureTransform
)
if
(
!
pXRenderSetPictureTransform
&&
!
repeat_src
)
#endif
{
FIXME
(
"Unable to Stretch, XRenderSetPictureTransform is currently required
\n
"
);
...
...
@@ -1751,6 +1756,7 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
TRACE
(
"src_format %p
\n
"
,
src_format
);
pa
.
subwindow_mode
=
IncludeInferiors
;
pa
.
repeat
=
repeat_src
?
RepeatNormal
:
RepeatNone
;
/* FIXME use devDst->xrender->pict ? */
dst_pict
=
pXRenderCreatePicture
(
gdi_display
,
...
...
@@ -1769,7 +1775,7 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
src_pict
=
pXRenderCreatePicture
(
gdi_display
,
xpm
,
src_format
,
CPSubwindowMode
,
&
pa
);
CPSubwindowMode
|
CPRepeat
,
&
pa
);
TRACE
(
"src_pict %08lx
\n
"
,
src_pict
);
if
(
rgndata
)
...
...
@@ -1782,7 +1788,7 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
}
#ifdef HAVE_XRENDERSETPICTURETRANSFORM
if
(
widthDst
!=
widthSrc
||
heightDst
!=
heightSrc
)
{
if
(
!
repeat_src
&&
(
widthDst
!=
widthSrc
||
heightDst
!=
heightSrc
)
)
{
double
xscale
=
widthSrc
/
(
double
)
widthDst
;
double
yscale
=
heightSrc
/
(
double
)
heightDst
;
XTransform
xform
=
{{
...
...
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