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
a875e3c6
Commit
a875e3c6
authored
Aug 24, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Aug 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Unroll the start- and end-of-line loops.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
45b848cc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
312 additions
and
23 deletions
+312
-23
primitives.c
dlls/gdi32/dibdrv/primitives.c
+312
-23
No files found.
dlls/gdi32/dibdrv/primitives.c
View file @
a875e3c6
...
@@ -5304,17 +5304,46 @@ static void mask_rect_32( const dib_info *dst, const RECT *rc,
...
@@ -5304,17 +5304,46 @@ static void mask_rect_32( const dib_info *dst, const RECT *rc,
return
;
return
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
((
8
-
(
origin
->
x
&
7
))
&
7
))
/
8
;
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
{
{
pos
=
origin
->
x
&
7
;
pos
=
origin
->
x
&
7
;
src_val
=
src_start
[
pos
/
8
];
x
=
0
;
for
(
x
=
0
;
x
<
rc
->
right
-
rc
->
left
&&
pos
<
8
;
x
++
,
pos
++
)
switch
(
pos
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
case
1
:
do_rop_codes_32
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
bit_val
=
src_val
>>
6
;
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
2
:
bit_val
=
src_val
>>
5
;
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
3
:
bit_val
=
src_val
>>
4
;
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
4
:
bit_val
=
src_val
>>
3
;
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
5
:
bit_val
=
src_val
>>
2
;
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
6
:
bit_val
=
src_val
>>
1
;
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
7
:
bit_val
=
src_val
;
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
pos
=
(
pos
+
7
)
&
~
7
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
x
)
/
8
;
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
{
{
src_val
=
src_start
[
pos
/
8
];
src_val
=
src_start
[
pos
/
8
];
...
@@ -5337,11 +5366,42 @@ static void mask_rect_32( const dib_info *dst, const RECT *rc,
...
@@ -5337,11 +5366,42 @@ static void mask_rect_32( const dib_info *dst, const RECT *rc,
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
do_rop_codes_32
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
}
}
for
(
;
x
<
rc
->
right
-
rc
->
left
;
x
++
,
pos
++
)
if
(
origin_end
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
src_val
=
src_start
[
pos
/
8
];
x
+=
(
origin_end
&
7
)
-
1
;
switch
(
origin_end
&
7
)
{
case
7
:
bit_val
=
src_val
>>
1
;
do_rop_codes_32
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
6
:
bit_val
=
src_val
>>
2
;
do_rop_codes_32
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
5
:
bit_val
=
src_val
>>
3
;
do_rop_codes_32
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
4
:
bit_val
=
src_val
>>
4
;
do_rop_codes_32
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
3
:
bit_val
=
src_val
>>
5
;
do_rop_codes_32
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
2
:
bit_val
=
src_val
>>
6
;
do_rop_codes_32
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
1
:
bit_val
=
src_val
>>
7
;
do_rop_codes_32
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
do_rop_codes_32
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
}
}
}
dst_start
+=
dst
->
stride
/
4
;
dst_start
+=
dst
->
stride
/
4
;
src_start
+=
src
->
stride
;
src_start
+=
src
->
stride
;
...
@@ -5381,20 +5441,74 @@ static void mask_rect_24( const dib_info *dst, const RECT *rc,
...
@@ -5381,20 +5441,74 @@ static void mask_rect_24( const dib_info *dst, const RECT *rc,
return
;
return
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
((
8
-
(
origin
->
x
&
7
))
&
7
))
/
8
;
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
{
{
pos
=
origin
->
x
&
7
;
pos
=
origin
->
x
&
7
;
src_val
=
src_start
[
pos
/
8
];
x
=
0
;
for
(
x
=
0
;
x
<
rc
->
right
-
rc
->
left
&&
pos
<
8
;
x
++
,
pos
++
)
switch
(
pos
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
case
1
:
bit_val
=
(
src_val
>>
6
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
++
;
/* fall through */
case
2
:
bit_val
=
(
src_val
>>
5
)
&
1
;
rgb
=
color_table
[
bit_val
];
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
++
;
/* fall through */
case
3
:
bit_val
=
(
src_val
>>
4
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
++
;
/* fall through */
case
4
:
bit_val
=
(
src_val
>>
3
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
++
;
/* fall through */
case
5
:
bit_val
=
(
src_val
>>
2
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
++
;
/* fall through */
case
6
:
bit_val
=
(
src_val
>>
1
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
++
;
/* fall through */
case
7
:
bit_val
=
src_val
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
++
;
pos
=
(
pos
+
7
)
&
~
7
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
x
)
/
8
;
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
{
{
src_val
=
src_start
[
pos
/
8
];
src_val
=
src_start
[
pos
/
8
];
...
@@ -5456,14 +5570,69 @@ static void mask_rect_24( const dib_info *dst, const RECT *rc,
...
@@ -5456,14 +5570,69 @@ static void mask_rect_24( const dib_info *dst, const RECT *rc,
x
++
;
x
++
;
}
}
for
(
;
x
<
rc
->
right
-
rc
->
left
;
x
++
,
pos
++
)
if
(
origin_end
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
src_val
=
src_start
[
pos
/
8
];
x
+=
(
origin_end
&
7
)
-
1
;
switch
(
origin_end
&
7
)
{
case
7
:
bit_val
=
(
src_val
>>
1
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
--
;
/* fall through */
case
6
:
bit_val
=
(
src_val
>>
2
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
--
;
/* fall through */
case
5
:
bit_val
=
(
src_val
>>
3
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
--
;
/* fall through */
case
4
:
bit_val
=
(
src_val
>>
4
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
--
;
/* fall through */
case
3
:
bit_val
=
(
src_val
>>
5
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
--
;
/* fall through */
case
2
:
bit_val
=
(
src_val
>>
6
)
&
1
;
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
x
--
;
/* fall through */
case
1
:
bit_val
=
(
src_val
>>
7
)
&
1
;
rgb
=
color_table
[
bit_val
];
rgb
=
color_table
[
bit_val
];
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
,
rgb
.
rgbBlue
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
1
,
rgb
.
rgbGreen
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
do_rop_codes_8
(
dst_start
+
x
*
3
+
2
,
rgb
.
rgbRed
,
&
codes
);
}
}
}
dst_start
+=
dst
->
stride
;
dst_start
+=
dst
->
stride
;
src_start
+=
src
->
stride
;
src_start
+=
src
->
stride
;
...
@@ -5510,17 +5679,46 @@ static void mask_rect_16( const dib_info *dst, const RECT *rc,
...
@@ -5510,17 +5679,46 @@ static void mask_rect_16( const dib_info *dst, const RECT *rc,
return
;
return
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
((
8
-
(
origin
->
x
&
7
))
&
7
))
/
8
;
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
{
{
pos
=
origin
->
x
&
7
;
pos
=
origin
->
x
&
7
;
src_val
=
src_start
[
pos
/
8
];
x
=
0
;
for
(
x
=
0
;
x
<
rc
->
right
-
rc
->
left
&&
pos
<
8
;
x
++
,
pos
++
)
switch
(
pos
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
case
1
:
do_rop_codes_16
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
bit_val
=
(
src_val
>>
6
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
2
:
bit_val
=
(
src_val
>>
5
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
3
:
bit_val
=
(
src_val
>>
4
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
4
:
bit_val
=
(
src_val
>>
3
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
5
:
bit_val
=
(
src_val
>>
2
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
6
:
bit_val
=
(
src_val
>>
1
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
7
:
bit_val
=
src_val
&
1
;
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
pos
=
(
pos
+
7
)
&
~
7
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
x
)
/
8
;
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
{
{
src_val
=
src_start
[
pos
/
8
];
src_val
=
src_start
[
pos
/
8
];
...
@@ -5543,11 +5741,42 @@ static void mask_rect_16( const dib_info *dst, const RECT *rc,
...
@@ -5543,11 +5741,42 @@ static void mask_rect_16( const dib_info *dst, const RECT *rc,
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
do_rop_codes_16
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
}
}
for
(
;
x
<
rc
->
right
-
rc
->
left
;
x
++
,
pos
++
)
if
(
origin_end
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
src_val
=
src_start
[
pos
/
8
];
x
+=
(
origin_end
&
7
)
-
1
;
switch
(
origin_end
&
7
)
{
case
7
:
bit_val
=
(
src_val
>>
1
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
6
:
bit_val
=
(
src_val
>>
2
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
5
:
bit_val
=
(
src_val
>>
3
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
4
:
bit_val
=
(
src_val
>>
4
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
3
:
bit_val
=
(
src_val
>>
5
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
2
:
bit_val
=
(
src_val
>>
6
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
1
:
bit_val
=
(
src_val
>>
7
)
&
1
;
do_rop_codes_16
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
do_rop_codes_16
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
}
}
}
dst_start
+=
dst
->
stride
/
2
;
dst_start
+=
dst
->
stride
/
2
;
src_start
+=
src
->
stride
;
src_start
+=
src
->
stride
;
...
@@ -5587,17 +5816,46 @@ static void mask_rect_8( const dib_info *dst, const RECT *rc,
...
@@ -5587,17 +5816,46 @@ static void mask_rect_8( const dib_info *dst, const RECT *rc,
return
;
return
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
((
8
-
(
origin
->
x
&
7
))
&
7
))
/
8
;
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
{
{
pos
=
origin
->
x
&
7
;
pos
=
origin
->
x
&
7
;
src_val
=
src_start
[
pos
/
8
];
x
=
0
;
for
(
x
=
0
;
x
<
rc
->
right
-
rc
->
left
&&
pos
<
8
;
x
++
,
pos
++
)
switch
(
pos
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
case
1
:
do_rop_codes_8
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
bit_val
=
(
src_val
>>
6
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
2
:
bit_val
=
(
src_val
>>
5
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
3
:
bit_val
=
(
src_val
>>
4
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
4
:
bit_val
=
(
src_val
>>
3
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
5
:
bit_val
=
(
src_val
>>
2
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
6
:
bit_val
=
(
src_val
>>
1
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
7
:
bit_val
=
src_val
&
1
;
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
pos
=
(
pos
+
7
)
&
~
7
;
}
}
full
=
((
rc
->
right
-
rc
->
left
)
-
x
)
/
8
;
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
for
(
i
=
0
;
i
<
full
;
i
++
,
pos
+=
8
)
{
{
src_val
=
src_start
[
pos
/
8
];
src_val
=
src_start
[
pos
/
8
];
...
@@ -5620,11 +5878,42 @@ static void mask_rect_8( const dib_info *dst, const RECT *rc,
...
@@ -5620,11 +5878,42 @@ static void mask_rect_8( const dib_info *dst, const RECT *rc,
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
do_rop_codes_8
(
dst_start
+
x
++
,
dst_colors
[
bit_val
],
&
codes
);
}
}
for
(
;
x
<
rc
->
right
-
rc
->
left
;
x
++
,
pos
++
)
if
(
origin_end
&
7
)
{
{
bit_val
=
(
src_start
[
pos
/
8
]
&
pixel_masks_1
[
pos
%
8
])
?
1
:
0
;
src_val
=
src_start
[
pos
/
8
];
x
+=
(
origin_end
&
7
)
-
1
;
switch
(
origin_end
&
7
)
{
case
7
:
bit_val
=
(
src_val
>>
1
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
6
:
bit_val
=
(
src_val
>>
2
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
5
:
bit_val
=
(
src_val
>>
3
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
4
:
bit_val
=
(
src_val
>>
4
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
3
:
bit_val
=
(
src_val
>>
5
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
2
:
bit_val
=
(
src_val
>>
6
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
--
,
dst_colors
[
bit_val
],
&
codes
);
/* fall through */
case
1
:
bit_val
=
(
src_val
>>
7
)
&
1
;
do_rop_codes_8
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
do_rop_codes_8
(
dst_start
+
x
,
dst_colors
[
bit_val
],
&
codes
);
}
}
}
dst_start
+=
dst
->
stride
;
dst_start
+=
dst
->
stride
;
src_start
+=
src
->
stride
;
src_start
+=
src
->
stride
;
...
...
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