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
b70b2670
Commit
b70b2670
authored
May 25, 2000
by
Chris Morgan
Committed by
Alexandre Julliard
May 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use clipping regions to reduce the amount of processing performed when the
toolbar is repainting. Reduces processing by approximately 85-95% in most cases.
parent
bfd5b31a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
toolbar.c
dlls/comctl32/toolbar.c
+14
-6
No files found.
dlls/comctl32/toolbar.c
View file @
b70b2670
...
...
@@ -299,16 +299,20 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
static
void
TOOLBAR_Refresh
(
HWND
hwnd
,
HDC
hdc
)
TOOLBAR_Refresh
(
HWND
hwnd
,
HDC
hdc
,
PAINTSTRUCT
*
ps
)
{
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
TBUTTON_INFO
*
btnPtr
;
INT
i
;
RECT
rcTemp
;
/*
draw
buttons */
/*
redraw necessary
buttons */
btnPtr
=
infoPtr
->
buttons
;
for
(
i
=
0
;
i
<
infoPtr
->
nNumButtons
;
i
++
,
btnPtr
++
)
{
if
(
IntersectRect
(
&
rcTemp
,
&
(
ps
->
rcPaint
),
&
(
btnPtr
->
rect
)))
TOOLBAR_DrawButton
(
hwnd
,
btnPtr
,
hdc
);
}
}
...
...
@@ -3456,14 +3460,18 @@ TOOLBAR_Notify (HWND hwnd, WPARAM wParam, LPARAM lParam)
static
LRESULT
TOOLBAR_Paint
(
HWND
hwnd
,
WPARAM
wParam
)
{
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
HDC
hdc
;
PAINTSTRUCT
ps
;
/* fill ps.rcPaint with a default rect */
memcpy
(
&
(
ps
.
rcPaint
),
&
(
infoPtr
->
rcBound
),
sizeof
(
infoPtr
->
rcBound
));
TOOLBAR_CalcToolbar
(
hwnd
);
hdc
=
wParam
==
0
?
BeginPaint
(
hwnd
,
&
ps
)
:
(
HDC
)
wParam
;
TOOLBAR_Refresh
(
hwnd
,
hdc
);
if
(
!
wParam
)
EndPaint
(
hwnd
,
&
ps
);
hdc
=
wParam
==
0
?
BeginPaint
(
hwnd
,
&
ps
)
:
(
HDC
)
wParam
;
TOOLBAR_Refresh
(
hwnd
,
hdc
,
&
ps
);
if
(
!
wParam
)
EndPaint
(
hwnd
,
&
ps
);
return
0
;
}
...
...
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