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
27989a0a
Commit
27989a0a
authored
Aug 20, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Aug 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Improve performance by switching loops and fix size.
parent
948412f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
graphics.c
dlls/gdiplus/graphics.c
+10
-10
image.c
dlls/gdiplus/image.c
+4
-4
No files found.
dlls/gdiplus/graphics.c
View file @
27989a0a
...
...
@@ -771,8 +771,8 @@ PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE d
max_green
=
(
key
->
high
>>
8
)
&
0xff
;
max_red
=
(
key
->
high
>>
16
)
&
0xff
;
for
(
x
=
0
;
x
<
width
;
x
++
)
for
(
y
=
0
;
y
<
height
;
y
++
)
for
(
y
=
0
;
y
<
height
;
y
++
)
for
(
x
=
0
;
x
<
width
;
x
++
)
{
ARGB
*
src_color
;
BYTE
blue
,
green
,
red
;
...
...
@@ -799,8 +799,8 @@ PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE d
else
table
=
&
attributes
->
colorremaptables
[
ColorAdjustTypeDefault
];
for
(
x
=
0
;
x
<
width
;
x
++
)
for
(
y
=
0
;
y
<
height
;
y
++
)
for
(
y
=
0
;
y
<
height
;
y
++
)
for
(
x
=
0
;
x
<
width
;
x
++
)
{
ARGB
*
src_color
;
src_color
=
(
ARGB
*
)(
data
+
stride
*
y
+
sizeof
(
ARGB
)
*
x
);
...
...
@@ -838,9 +838,9 @@ PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE d
if
(
!
identity
)
{
for
(
x
=
0
;
x
<
width
;
x
++
)
for
(
y
=
0
;
y
<
height
;
y
++
)
{
for
(
y
=
0
;
y
<
height
;
y
++
)
for
(
x
=
0
;
x
<
width
;
x
++
)
{
ARGB
*
src_color
;
src_color
=
(
ARGB
*
)(
data
+
stride
*
y
+
sizeof
(
ARGB
)
*
x
);
...
...
@@ -872,8 +872,8 @@ PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE d
else
gamma
=
attributes
->
gamma
[
ColorAdjustTypeDefault
];
for
(
x
=
0
;
x
<
width
;
x
++
)
for
(
y
=
0
;
y
<
height
;
y
++
)
for
(
y
=
0
;
y
<
height
;
y
++
)
for
(
x
=
0
;
x
<
width
;
x
++
)
{
ARGB
*
src_color
;
BYTE
blue
,
green
,
red
;
...
...
@@ -1201,8 +1201,8 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
{
int
x
,
y
;
GpSolidFill
*
fill
=
(
GpSolidFill
*
)
brush
;
for
(
x
=
0
;
x
<
fill_area
->
Width
;
x
++
)
for
(
y
=
0
;
y
<
fill_area
->
Height
;
y
++
)
for
(
y
=
0
;
y
<
fill_area
->
Height
;
y
++
)
for
(
x
=
0
;
x
<
fill_area
->
Width
;
x
++
)
argb_pixels
[
x
+
y
*
cdwStride
]
=
fill
->
color
;
return
Ok
;
}
...
...
dlls/gdiplus/image.c
View file @
27989a0a
...
...
@@ -1693,8 +1693,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
/* If any pixel has a non-zero alpha, ignore hbmMask */
src
=
(
DWORD
*
)
lockeddata
.
Scan0
;
for
(
x
=
0
;
x
<
width
&&
!
has_alpha
;
x
++
)
for
(
y
=
0
;
y
<
height
&&
!
has_alpha
;
y
++
)
for
(
y
=
0
;
y
<
height
&&
!
has_alpha
;
y
++
)
for
(
x
=
0
;
x
<
width
&&
!
has_alpha
;
x
++
)
if
((
*
src
++
&
0xff000000
)
!=
0
)
has_alpha
=
TRUE
;
}
...
...
@@ -1723,7 +1723,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
for
(
y
=
0
;
y
<
height
;
y
++
)
{
dst
=
(
DWORD
*
)
dst_row
;
for
(
x
=
0
;
x
<
height
;
x
++
)
for
(
x
=
0
;
x
<
width
;
x
++
)
{
DWORD
src_value
=
*
src
++
;
if
(
src_value
)
...
...
@@ -1743,7 +1743,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
for
(
y
=
0
;
y
<
height
;
y
++
)
{
dst
=
(
DWORD
*
)
dst_row
;
for
(
x
=
0
;
x
<
height
;
x
++
)
for
(
x
=
0
;
x
<
width
;
x
++
)
*
dst
++
|=
0xff000000
;
dst_row
+=
lockeddata
.
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