Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b39425f3
Commit
b39425f3
authored
Mar 11, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Create GDI bitmap only when needed.
parent
495a0cba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
16 deletions
+5
-16
brush.c
dlls/gdiplus/brush.c
+0
-11
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+0
-1
graphics.c
dlls/gdiplus/graphics.c
+5
-4
No files found.
dlls/gdiplus/brush.c
View file @
b39425f3
...
...
@@ -47,15 +47,9 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
switch
(
brush
->
bt
){
case
BrushTypeSolidColor
:
{
GpSolidFill
*
fill
;
*
clone
=
GdipAlloc
(
sizeof
(
GpSolidFill
));
if
(
!*
clone
)
return
OutOfMemory
;
fill
=
(
GpSolidFill
*
)
*
clone
;
memcpy
(
*
clone
,
brush
,
sizeof
(
GpSolidFill
));
fill
->
bmp
=
ARGB2BMP
(
fill
->
color
);
break
;
}
case
BrushTypeHatchFill
:
...
...
@@ -654,7 +648,6 @@ GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB color, GpSolidFill **sf)
(
*
sf
)
->
brush
.
bt
=
BrushTypeSolidColor
;
(
*
sf
)
->
color
=
color
;
(
*
sf
)
->
bmp
=
ARGB2BMP
(
color
);
TRACE
(
"<-- %p
\n
"
,
*
sf
);
...
...
@@ -899,10 +892,6 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush *brush)
GdipFree
(((
GpPathGradient
*
)
brush
)
->
blendfac
);
GdipFree
(((
GpPathGradient
*
)
brush
)
->
blendpos
);
break
;
case
BrushTypeSolidColor
:
if
(((
GpSolidFill
*
)
brush
)
->
bmp
)
DeleteObject
(((
GpSolidFill
*
)
brush
)
->
bmp
);
break
;
case
BrushTypeLinearGradient
:
GdipFree
(((
GpLineGradient
*
)
brush
)
->
blendfac
);
GdipFree
(((
GpLineGradient
*
)
brush
)
->
blendpos
);
...
...
dlls/gdiplus/gdiplus_private.h
View file @
b39425f3
...
...
@@ -183,7 +183,6 @@ struct GpHatch{
struct
GpSolidFill
{
GpBrush
brush
;
ARGB
color
;
HBITMAP
bmp
;
};
struct
GpPathGradient
{
...
...
dlls/gdiplus/graphics.c
View file @
b39425f3
...
...
@@ -847,7 +847,9 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
case
BrushTypeSolidColor
:
{
GpSolidFill
*
fill
=
(
GpSolidFill
*
)
brush
;
if
(
fill
->
bmp
)
HBITMAP
bmp
=
ARGB2BMP
(
fill
->
color
);
if
(
bmp
)
{
RECT
rc
;
/* partially transparent fill */
...
...
@@ -856,12 +858,11 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
if
(
GetClipBox
(
graphics
->
hdc
,
&
rc
)
!=
NULLREGION
)
{
HDC
hdc
=
CreateCompatibleDC
(
NULL
);
HBITMAP
oldbmp
;
BLENDFUNCTION
bf
;
if
(
!
hdc
)
break
;
oldbmp
=
SelectObject
(
hdc
,
fill
->
bmp
);
SelectObject
(
hdc
,
bmp
);
bf
.
BlendOp
=
AC_SRC_OVER
;
bf
.
BlendFlags
=
0
;
...
...
@@ -870,10 +871,10 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
GdiAlphaBlend
(
graphics
->
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
hdc
,
0
,
0
,
1
,
1
,
bf
);
SelectObject
(
hdc
,
oldbmp
);
DeleteDC
(
hdc
);
}
DeleteObject
(
bmp
);
break
;
}
/* else fall through */
...
...
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