Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
89a7f21f
Commit
89a7f21f
authored
Apr 25, 2007
by
damienf
Browse files
- directx: optimize WM_PAINT event handling
parent
b939d657
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/video_output/directx/events.c
View file @
89a7f21f
...
...
@@ -790,7 +790,24 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
}
if
(
hwnd
==
p_vout
->
p_sys
->
hvideownd
)
return
DefWindowProc
(
hwnd
,
message
,
wParam
,
lParam
);
{
switch
(
message
)
{
case
WM_ERASEBKGND
:
// erase the background only if a brush is set
return
(
0UL
==
GetClassLong
(
hwnd
,
GCL_HBRBACKGROUND
)
)
?
1
:
DefWindowProc
(
hwnd
,
message
,
wParam
,
lParam
);
case
WM_PAINT
:
if
(
0UL
==
GetClassLong
(
hwnd
,
GCL_HBRBACKGROUND
)
)
{
// vout paints the whole area, no need to repaint it
ValidateRect
(
hwnd
,
NULL
);
}
// fall through
default:
return
DefWindowProc
(
hwnd
,
message
,
wParam
,
lParam
);
}
}
switch
(
message
)
{
...
...
@@ -842,8 +859,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
case
WM_PAINT
:
case
WM_NCPAINT
:
case
WM_ERASEBKGND
:
/* We do not want to relay these messages to the parent window
* because we rely on the background color for the overlay. */
return
DefWindowProc
(
hwnd
,
message
,
wParam
,
lParam
);
default:
...
...
Write
Preview
Supports
Markdown
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