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
4b39c7b9
Commit
4b39c7b9
authored
Aug 25, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Aug 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Explicitly write out the rops for copy_rect_32().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1d0e25e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
11 deletions
+36
-11
primitives.c
dlls/gdi32/dibdrv/primitives.c
+36
-11
No files found.
dlls/gdi32/dibdrv/primitives.c
View file @
4b39c7b9
...
@@ -108,6 +108,23 @@ static const BYTE pixel_masks_4[2] = {0xf0, 0x0f};
...
@@ -108,6 +108,23 @@ static const BYTE pixel_masks_4[2] = {0xf0, 0x0f};
static
const
BYTE
pixel_masks_1
[
8
]
=
{
0x80
,
0x40
,
0x20
,
0x10
,
0x08
,
0x04
,
0x02
,
0x01
};
static
const
BYTE
pixel_masks_1
[
8
]
=
{
0x80
,
0x40
,
0x20
,
0x10
,
0x08
,
0x04
,
0x02
,
0x01
};
static
const
BYTE
edge_masks_1
[
8
]
=
{
0xff
,
0x7f
,
0x3f
,
0x1f
,
0x0f
,
0x07
,
0x03
,
0x01
};
static
const
BYTE
edge_masks_1
[
8
]
=
{
0xff
,
0x7f
,
0x3f
,
0x1f
,
0x0f
,
0x07
,
0x03
,
0x01
};
#define ROPS_WITHOUT_COPY( _d, _s ) \
case R2_BLACK: LOOP( (_d) = 0 ) break; \
case R2_NOTMERGEPEN: LOOP( (_d) = ~((_d) | (_s)) ) break; \
case R2_MASKNOTPEN: LOOP( (_d) &= ~(_s) ) break; \
case R2_NOTCOPYPEN: LOOP( (_d) = ~(_s) ) break; \
case R2_MASKPENNOT: LOOP( (_d) = (~(_d) & (_s)) ) break; \
case R2_NOT: LOOP( (_d) = ~(_d) ) break; \
case R2_XORPEN: LOOP( (_d) ^= (_s) ) break; \
case R2_NOTMASKPEN: LOOP( (_d) = ~((_d) & (_s)) ) break; \
case R2_MASKPEN: LOOP( (_d) &= (_s) ) break; \
case R2_NOTXORPEN: LOOP( (_d) = ~((_d) ^ (_s)) ) break; \
case R2_NOP: break; \
case R2_MERGENOTPEN: LOOP( (_d) = ((_d) | ~(_s)) ) break; \
case R2_MERGEPENNOT: LOOP( (_d) = (~(_d) | (_s)) ) break; \
case R2_MERGEPEN: LOOP( (_d) |= (_s) ) break; \
case R2_WHITE: LOOP( (_d) = ~0 ) break;
static
inline
void
do_rop_32
(
DWORD
*
ptr
,
DWORD
and
,
DWORD
xor
)
static
inline
void
do_rop_32
(
DWORD
*
ptr
,
DWORD
and
,
DWORD
xor
)
{
{
*
ptr
=
(
*
ptr
&
and
)
^
xor
;
*
ptr
=
(
*
ptr
&
and
)
^
xor
;
...
@@ -1588,13 +1605,17 @@ static inline void copy_rect_bits_32( DWORD *dst_start, const DWORD *src_start,
...
@@ -1588,13 +1605,17 @@ static inline void copy_rect_bits_32( DWORD *dst_start, const DWORD *src_start,
const
DWORD
*
src
;
const
DWORD
*
src
;
DWORD
*
dst
;
DWORD
*
dst
;
int
x
,
y
;
int
x
,
y
;
struct
rop_codes
codes
;
get_rop_codes
(
rop2
,
&
codes
);
#define LOOP( op ) \
for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) \
for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src++, dst++) \
op;
for
(
y
=
0
;
y
<
size
->
cy
;
y
++
,
dst_start
+=
dst_stride
,
src_start
+=
src_stride
)
switch
(
rop2
)
for
(
x
=
0
,
src
=
src_start
,
dst
=
dst_start
;
x
<
size
->
cx
;
x
++
,
src
++
,
dst
++
)
{
do_rop_codes_32
(
dst
,
*
src
,
&
codes
);
ROPS_WITHOUT_COPY
(
dst
[
0
],
src
[
0
]
)
}
#undef LOOP
}
}
static
inline
void
copy_rect_bits_rev_32
(
DWORD
*
dst_start
,
const
DWORD
*
src_start
,
const
SIZE
*
size
,
static
inline
void
copy_rect_bits_rev_32
(
DWORD
*
dst_start
,
const
DWORD
*
src_start
,
const
SIZE
*
size
,
...
@@ -1603,16 +1624,20 @@ static inline void copy_rect_bits_rev_32( DWORD *dst_start, const DWORD *src_sta
...
@@ -1603,16 +1624,20 @@ static inline void copy_rect_bits_rev_32( DWORD *dst_start, const DWORD *src_sta
const
DWORD
*
src
;
const
DWORD
*
src
;
DWORD
*
dst
;
DWORD
*
dst
;
int
x
,
y
;
int
x
,
y
;
struct
rop_codes
codes
;
get_rop_codes
(
rop2
,
&
codes
);
src_start
+=
size
->
cx
-
1
;
src_start
+=
size
->
cx
-
1
;
dst_start
+=
size
->
cx
-
1
;
dst_start
+=
size
->
cx
-
1
;
for
(
y
=
0
;
y
<
size
->
cy
;
y
++
,
dst_start
+=
dst_stride
,
src_start
+=
src_stride
)
#define LOOP( op ) \
for
(
x
=
0
,
src
=
src_start
,
dst
=
dst_start
;
x
<
size
->
cx
;
x
++
,
src
--
,
dst
--
)
for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) \
do_rop_codes_32
(
dst
,
*
src
,
&
codes
);
for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src--, dst--) \
op;
switch
(
rop2
)
{
ROPS_WITHOUT_COPY
(
dst
[
0
],
src
[
0
]
)
}
#undef LOOP
}
}
static
void
copy_rect_32
(
const
dib_info
*
dst
,
const
RECT
*
rc
,
static
void
copy_rect_32
(
const
dib_info
*
dst
,
const
RECT
*
rc
,
...
...
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