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
db3a8d6c
Commit
db3a8d6c
authored
Dec 03, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Avoid binary ROPs when shrinking in DELETESCANS mode.
parent
6f6e919e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
0 deletions
+74
-0
primitives.c
dlls/gdi32/dibdrv/primitives.c
+74
-0
No files found.
dlls/gdi32/dibdrv/primitives.c
View file @
db3a8d6c
...
@@ -5950,6 +5950,23 @@ static void shrink_row_32(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -5950,6 +5950,23 @@ static void shrink_row_32(const dib_info *dst_dib, const POINT *dst_start,
DWORD
*
src_ptr
=
get_pixel_ptr_32
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
DWORD
*
src_ptr
=
get_pixel_ptr_32
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
int
err
=
params
->
err_start
;
int
err
=
params
->
err_start
;
int
width
;
int
width
;
if
(
mode
==
STRETCH_DELETESCANS
)
{
for
(
width
=
params
->
length
;
width
;
width
--
)
{
*
dst_ptr
=
*
src_ptr
;
src_ptr
+=
params
->
src_inc
;
if
(
err
>
0
)
{
dst_ptr
+=
params
->
dst_inc
;
err
+=
params
->
err_add_1
;
}
else
err
+=
params
->
err_add_2
;
}
}
else
{
struct
rop_codes
codes
;
struct
rop_codes
codes
;
DWORD
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
DWORD
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
BOOL
new_pix
=
TRUE
;
BOOL
new_pix
=
TRUE
;
...
@@ -5969,6 +5986,7 @@ static void shrink_row_32(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -5969,6 +5986,7 @@ static void shrink_row_32(const dib_info *dst_dib, const POINT *dst_start,
}
}
else
err
+=
params
->
err_add_2
;
else
err
+=
params
->
err_add_2
;
}
}
}
}
}
static
void
shrink_row_24
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
static
void
shrink_row_24
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
...
@@ -5980,6 +5998,25 @@ static void shrink_row_24(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -5980,6 +5998,25 @@ static void shrink_row_24(const dib_info *dst_dib, const POINT *dst_start,
BYTE
*
src_ptr
=
get_pixel_ptr_24
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
BYTE
*
src_ptr
=
get_pixel_ptr_24
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
int
err
=
params
->
err_start
;
int
err
=
params
->
err_start
;
int
width
;
int
width
;
if
(
mode
==
STRETCH_DELETESCANS
)
{
for
(
width
=
params
->
length
;
width
;
width
--
)
{
dst_ptr
[
0
]
=
src_ptr
[
0
];
dst_ptr
[
1
]
=
src_ptr
[
1
];
dst_ptr
[
2
]
=
src_ptr
[
2
];
src_ptr
+=
3
*
params
->
src_inc
;
if
(
err
>
0
)
{
dst_ptr
+=
3
*
params
->
dst_inc
;
err
+=
params
->
err_add_1
;
}
else
err
+=
params
->
err_add_2
;
}
}
else
{
struct
rop_codes
codes
;
struct
rop_codes
codes
;
BYTE
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
BYTE
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
BOOL
new_pix
=
TRUE
;
BOOL
new_pix
=
TRUE
;
...
@@ -6001,6 +6038,7 @@ static void shrink_row_24(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -6001,6 +6038,7 @@ static void shrink_row_24(const dib_info *dst_dib, const POINT *dst_start,
}
}
else
err
+=
params
->
err_add_2
;
else
err
+=
params
->
err_add_2
;
}
}
}
}
}
static
void
shrink_row_16
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
static
void
shrink_row_16
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
...
@@ -6012,6 +6050,23 @@ static void shrink_row_16(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -6012,6 +6050,23 @@ static void shrink_row_16(const dib_info *dst_dib, const POINT *dst_start,
WORD
*
src_ptr
=
get_pixel_ptr_16
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
WORD
*
src_ptr
=
get_pixel_ptr_16
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
int
err
=
params
->
err_start
;
int
err
=
params
->
err_start
;
int
width
;
int
width
;
if
(
mode
==
STRETCH_DELETESCANS
)
{
for
(
width
=
params
->
length
;
width
;
width
--
)
{
*
dst_ptr
=
*
src_ptr
;
src_ptr
+=
params
->
src_inc
;
if
(
err
>
0
)
{
dst_ptr
+=
params
->
dst_inc
;
err
+=
params
->
err_add_1
;
}
else
err
+=
params
->
err_add_2
;
}
}
else
{
struct
rop_codes
codes
;
struct
rop_codes
codes
;
WORD
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
WORD
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
BOOL
new_pix
=
TRUE
;
BOOL
new_pix
=
TRUE
;
...
@@ -6031,6 +6086,7 @@ static void shrink_row_16(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -6031,6 +6086,7 @@ static void shrink_row_16(const dib_info *dst_dib, const POINT *dst_start,
}
}
else
err
+=
params
->
err_add_2
;
else
err
+=
params
->
err_add_2
;
}
}
}
}
}
static
void
shrink_row_8
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
static
void
shrink_row_8
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
...
@@ -6042,6 +6098,23 @@ static void shrink_row_8(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -6042,6 +6098,23 @@ static void shrink_row_8(const dib_info *dst_dib, const POINT *dst_start,
BYTE
*
src_ptr
=
get_pixel_ptr_8
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
BYTE
*
src_ptr
=
get_pixel_ptr_8
(
src_dib
,
src_start
->
x
,
src_start
->
y
);
int
err
=
params
->
err_start
;
int
err
=
params
->
err_start
;
int
width
;
int
width
;
if
(
mode
==
STRETCH_DELETESCANS
)
{
for
(
width
=
params
->
length
;
width
;
width
--
)
{
*
dst_ptr
=
*
src_ptr
;
src_ptr
+=
params
->
src_inc
;
if
(
err
>
0
)
{
dst_ptr
+=
params
->
dst_inc
;
err
+=
params
->
err_add_1
;
}
else
err
+=
params
->
err_add_2
;
}
}
else
{
struct
rop_codes
codes
;
struct
rop_codes
codes
;
BYTE
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
BYTE
init_val
=
(
mode
==
STRETCH_ANDSCANS
)
?
~
0u
:
0u
;
BOOL
new_pix
=
TRUE
;
BOOL
new_pix
=
TRUE
;
...
@@ -6061,6 +6134,7 @@ static void shrink_row_8(const dib_info *dst_dib, const POINT *dst_start,
...
@@ -6061,6 +6134,7 @@ static void shrink_row_8(const dib_info *dst_dib, const POINT *dst_start,
}
}
else
err
+=
params
->
err_add_2
;
else
err
+=
params
->
err_add_2
;
}
}
}
}
}
static
void
shrink_row_4
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
static
void
shrink_row_4
(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
...
...
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