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
4b50743f
Commit
4b50743f
authored
Aug 02, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Aug 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Simplify the calculation of the rop masks.
parent
b5a33dab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
objects.c
dlls/gdi32/dibdrv/objects.c
+8
-8
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
4b50743f
...
...
@@ -57,11 +57,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(dib);
*
*/
/* A = (P & A1)
| (~P & A2)
*/
#define ZERO
{0, 0
}
#define ONE
{0xffffffff, 0xffffffff
}
#define P
{0xffffffff, 0
}
#define NOT_P {
0, 0xffffffff
}
/* A = (P & A1)
^ A2
*/
#define ZERO
{ 0u, 0u
}
#define ONE
{ 0u, ~0u
}
#define P
{~0u, 0u
}
#define NOT_P {
~0u, ~0u
}
static
const
DWORD
rop2_and_array
[
16
][
2
]
=
{
...
...
@@ -71,7 +71,7 @@ static const DWORD rop2_and_array[16][2] =
ZERO
,
NOT_P
,
NOT_P
,
ZERO
};
/* X = (P & X1)
| (~P & X2)
*/
/* X = (P & X1)
^ X2
*/
static
const
DWORD
rop2_xor_array
[
16
][
2
]
=
{
ZERO
,
NOT_P
,
ZERO
,
NOT_P
,
...
...
@@ -88,8 +88,8 @@ static const DWORD rop2_xor_array[16][2] =
void
calc_and_xor_masks
(
INT
rop
,
DWORD
color
,
DWORD
*
and
,
DWORD
*
xor
)
{
/* NB The ROP2 codes start at one and the arrays are zero-based */
*
and
=
(
color
&
rop2_and_array
[
rop
-
1
][
0
])
|
((
~
color
)
&
rop2_and_array
[
rop
-
1
][
1
])
;
*
xor
=
(
color
&
rop2_xor_array
[
rop
-
1
][
0
])
|
((
~
color
)
&
rop2_xor_array
[
rop
-
1
][
1
])
;
*
and
=
(
color
&
rop2_and_array
[
rop
-
1
][
0
])
^
rop2_and_array
[
rop
-
1
][
1
]
;
*
xor
=
(
color
&
rop2_xor_array
[
rop
-
1
][
0
])
^
rop2_xor_array
[
rop
-
1
][
1
]
;
}
static
inline
RGBQUAD
rgbquad_from_colorref
(
COLORREF
c
)
...
...
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