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
7339308e
Commit
7339308e
authored
Nov 29, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add faster implementation of the pattern_rects primitive when we don't need an AND mask.
parent
2aff4696
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
objects.c
dlls/gdi32/dibdrv/objects.c
+11
-3
primitives.c
dlls/gdi32/dibdrv/primitives.c
+0
-0
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
7339308e
...
@@ -108,6 +108,13 @@ static inline void calc_rop_masks(INT rop, DWORD color, rop_mask *masks)
...
@@ -108,6 +108,13 @@ static inline void calc_rop_masks(INT rop, DWORD color, rop_mask *masks)
calc_and_xor_masks
(
rop
,
color
,
&
masks
->
and
,
&
masks
->
xor
);
calc_and_xor_masks
(
rop
,
color
,
&
masks
->
and
,
&
masks
->
xor
);
}
}
static
inline
BOOL
rop_needs_and_mask
(
INT
rop
)
{
struct
rop_codes
codes
;
get_rop_codes
(
rop
,
&
codes
);
return
codes
.
a1
||
codes
.
a2
;
}
static
inline
RGBQUAD
rgbquad_from_colorref
(
COLORREF
c
)
static
inline
RGBQUAD
rgbquad_from_colorref
(
COLORREF
c
)
{
{
RGBQUAD
ret
;
RGBQUAD
ret
;
...
@@ -1768,8 +1775,8 @@ static BOOL alloc_brush_mask_bits( dib_brush *brush )
...
@@ -1768,8 +1775,8 @@ static BOOL alloc_brush_mask_bits( dib_brush *brush )
assert
(
brush
->
masks
.
xor
==
NULL
);
assert
(
brush
->
masks
.
xor
==
NULL
);
assert
(
brush
->
dib
.
stride
>
0
);
assert
(
brush
->
dib
.
stride
>
0
);
if
(
!
(
brush
->
masks
.
and
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
size
)))
return
FALSE
;
if
(
!
(
brush
->
masks
.
xor
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
size
)))
return
FALSE
;
brush
->
masks
.
xor
=
(
char
*
)
brush
->
masks
.
and
+
size
;
brush
->
masks
.
and
=
(
char
*
)
brush
->
masks
.
xor
+
size
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1980,7 +1987,7 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_brush *brush, dib_info *dib,
...
@@ -1980,7 +1987,7 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_brush *brush, dib_info *dib,
brush
->
rop
=
rop
;
brush
->
rop
=
rop
;
}
}
if
(
brush
->
masks
.
and
==
NULL
)
if
(
brush
->
masks
.
xor
==
NULL
)
{
{
switch
(
brush
->
style
)
switch
(
brush
->
style
)
{
{
...
@@ -2005,6 +2012,7 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_brush *brush, dib_info *dib,
...
@@ -2005,6 +2012,7 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_brush *brush, dib_info *dib,
ERR
(
"Unexpected brush style %d
\n
"
,
brush
->
style
);
ERR
(
"Unexpected brush style %d
\n
"
,
brush
->
style
);
return
FALSE
;
return
FALSE
;
}
}
if
(
!
rop_needs_and_mask
(
brush
->
rop
))
brush
->
masks
.
and
=
NULL
;
/* ignore the and mask */
}
}
GetBrushOrgEx
(
pdev
->
dev
.
hdc
,
&
origin
);
GetBrushOrgEx
(
pdev
->
dev
.
hdc
,
&
origin
);
...
...
dlls/gdi32/dibdrv/primitives.c
View file @
7339308e
This diff is collapsed.
Click to expand it.
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