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
d1d8b4de
Commit
d1d8b4de
authored
Oct 12, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move some common code out of the individual copy_rect functions.
parent
8f4d50ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
78 deletions
+22
-78
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+22
-0
primitives.c
dlls/gdi32/dibdrv/primitives.c
+0
-78
No files found.
dlls/gdi32/dibdrv/bitblt.c
View file @
d1d8b4de
...
...
@@ -473,6 +473,28 @@ static DWORD copy_rect( dib_info *dst, const RECT *dst_rect, const dib_info *src
RECT
clipped_rect
;
const
WINEREGION
*
clip_data
;
int
i
,
start
,
end
,
overlap
;
DWORD
and
=
0
,
xor
=
0
;
switch
(
rop2
)
{
case
R2_NOT
:
and
=
~
0u
;
/* fall through */
case
R2_WHITE
:
xor
=
~
0u
;
/* fall through */
case
R2_BLACK
:
if
(
clip
)
{
clip_data
=
get_wine_region
(
clip
);
for
(
i
=
0
;
i
<
clip_data
->
numRects
;
i
++
)
if
(
intersect_rect
(
&
clipped_rect
,
dst_rect
,
clip_data
->
rects
+
i
))
dst
->
funcs
->
solid_rects
(
dst
,
1
,
&
clipped_rect
,
and
,
xor
);
release_wine_region
(
clip
);
}
else
dst
->
funcs
->
solid_rects
(
dst
,
1
,
dst_rect
,
and
,
xor
);
/* fall through */
case
R2_NOP
:
return
ERROR_SUCCESS
;
}
origin
.
x
=
src_rect
->
left
;
origin
.
y
=
src_rect
->
top
;
...
...
dlls/gdi32/dibdrv/primitives.c
View file @
d1d8b4de
...
...
@@ -785,22 +785,9 @@ static void copy_rect_32(const dib_info *dst, const RECT *rc,
const
dib_info
*
src
,
const
POINT
*
origin
,
int
rop2
,
int
overlap
)
{
DWORD
*
dst_start
,
*
src_start
;
DWORD
and
=
0
,
xor
=
0
;
struct
rop_codes
codes
;
int
y
,
dst_stride
,
src_stride
;
switch
(
rop2
)
{
case
R2_NOP
:
return
;
case
R2_NOT
:
and
=
~
0u
;
/* fall through */
case
R2_WHITE
:
xor
=
~
0u
;
/* fall through */
case
R2_BLACK
:
dst
->
funcs
->
solid_rects
(
dst
,
1
,
rc
,
and
,
xor
);
return
;
}
if
(
overlap
&
OVERLAP_BELOW
)
{
dst_start
=
get_pixel_ptr_32
(
dst
,
rc
->
left
,
rc
->
bottom
-
1
);
...
...
@@ -837,22 +824,9 @@ static void copy_rect_24(const dib_info *dst, const RECT *rc,
const
dib_info
*
src
,
const
POINT
*
origin
,
int
rop2
,
int
overlap
)
{
BYTE
*
dst_start
,
*
src_start
;
DWORD
and
=
0
,
xor
=
0
;
int
y
,
dst_stride
,
src_stride
;
struct
rop_codes
codes
;
switch
(
rop2
)
{
case
R2_NOP
:
return
;
case
R2_NOT
:
and
=
~
0u
;
/* fall through */
case
R2_WHITE
:
xor
=
~
0u
;
/* fall through */
case
R2_BLACK
:
dst
->
funcs
->
solid_rects
(
dst
,
1
,
rc
,
and
,
xor
);
return
;
}
if
(
overlap
&
OVERLAP_BELOW
)
{
dst_start
=
get_pixel_ptr_24
(
dst
,
rc
->
left
,
rc
->
bottom
-
1
);
...
...
@@ -889,22 +863,9 @@ static void copy_rect_16(const dib_info *dst, const RECT *rc,
const
dib_info
*
src
,
const
POINT
*
origin
,
int
rop2
,
int
overlap
)
{
WORD
*
dst_start
,
*
src_start
;
DWORD
and
=
0
,
xor
=
0
;
int
y
,
dst_stride
,
src_stride
;
struct
rop_codes
codes
;
switch
(
rop2
)
{
case
R2_NOP
:
return
;
case
R2_NOT
:
and
=
~
0u
;
/* fall through */
case
R2_WHITE
:
xor
=
~
0u
;
/* fall through */
case
R2_BLACK
:
dst
->
funcs
->
solid_rects
(
dst
,
1
,
rc
,
and
,
xor
);
return
;
}
if
(
overlap
&
OVERLAP_BELOW
)
{
dst_start
=
get_pixel_ptr_16
(
dst
,
rc
->
left
,
rc
->
bottom
-
1
);
...
...
@@ -941,22 +902,9 @@ static void copy_rect_8(const dib_info *dst, const RECT *rc,
const
dib_info
*
src
,
const
POINT
*
origin
,
int
rop2
,
int
overlap
)
{
BYTE
*
dst_start
,
*
src_start
;
DWORD
and
=
0
,
xor
=
0
;
int
y
,
dst_stride
,
src_stride
;
struct
rop_codes
codes
;
switch
(
rop2
)
{
case
R2_NOP
:
return
;
case
R2_NOT
:
and
=
~
0u
;
/* fall through */
case
R2_WHITE
:
xor
=
~
0u
;
/* fall through */
case
R2_BLACK
:
dst
->
funcs
->
solid_rects
(
dst
,
1
,
rc
,
and
,
xor
);
return
;
}
if
(
overlap
&
OVERLAP_BELOW
)
{
dst_start
=
get_pixel_ptr_8
(
dst
,
rc
->
left
,
rc
->
bottom
-
1
);
...
...
@@ -993,22 +941,9 @@ static void copy_rect_4(const dib_info *dst, const RECT *rc,
const
dib_info
*
src
,
const
POINT
*
origin
,
int
rop2
,
int
overlap
)
{
BYTE
*
dst_start
,
*
src_start
;
DWORD
and
=
0
,
xor
=
0
;
int
y
,
dst_stride
,
src_stride
;
struct
rop_codes
codes
;
switch
(
rop2
)
{
case
R2_NOP
:
return
;
case
R2_NOT
:
and
=
~
0u
;
/* fall through */
case
R2_WHITE
:
xor
=
~
0u
;
/* fall through */
case
R2_BLACK
:
dst
->
funcs
->
solid_rects
(
dst
,
1
,
rc
,
and
,
xor
);
return
;
}
if
(
overlap
&
OVERLAP_BELOW
)
{
dst_start
=
get_pixel_ptr_4
(
dst
,
0
,
rc
->
bottom
-
1
);
...
...
@@ -1047,22 +982,9 @@ static void copy_rect_1(const dib_info *dst, const RECT *rc,
const
dib_info
*
src
,
const
POINT
*
origin
,
int
rop2
,
int
overlap
)
{
BYTE
*
dst_start
,
*
src_start
;
DWORD
and
=
0
,
xor
=
0
;
int
y
,
dst_stride
,
src_stride
;
struct
rop_codes
codes
;
switch
(
rop2
)
{
case
R2_NOP
:
return
;
case
R2_NOT
:
and
=
~
0u
;
/* fall through */
case
R2_WHITE
:
xor
=
~
0u
;
/* fall through */
case
R2_BLACK
:
dst
->
funcs
->
solid_rects
(
dst
,
1
,
rc
,
and
,
xor
);
return
;
}
if
(
overlap
&
OVERLAP_BELOW
)
{
dst_start
=
get_pixel_ptr_1
(
dst
,
0
,
rc
->
bottom
-
1
);
...
...
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