STR #1681: On WIN32 WM_PAINT messages, FLTK would first render the damaged area and then set the area as valid again. While this is mostly fine on single CPU machines, multi-CPU machines may re-invalidate areas that are currently drawn, resulting in unrendered strips when another window was moved quickly across an FLTK window during its redraw phase.
The new implementation validates the damaged area as quickly as possible, allowing new damage requests to be handled correctly, even while we are still redrawing the same damaged area. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
849efb47ae
commit
04ced5396e
1
CHANGES
1
CHANGES
@ -3,6 +3,7 @@ CHANGES IN FLTK 1.1.8
|
||||
- Documentation fixes (STR #1454, STR #1455, STR #1456,
|
||||
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578,
|
||||
STR #1639, STR #1645, STR #1644)
|
||||
- Fixed occasional incomplete refresh (STR #1681)
|
||||
- Improved fl_down, fl_frame, added fl_box (STR #1678)
|
||||
- Fixed selection of submenu items in
|
||||
input_choice (STR #1676)
|
||||
|
@ -723,12 +723,13 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
|
||||
if (i->region) {
|
||||
// Also tell WIN32 that we are drawing someplace else as well...
|
||||
InvalidateRgn(hWnd, i->region, FALSE);
|
||||
CombineRgn(i->region, i->region, R, RGN_OR);
|
||||
XDestroyRegion(R);
|
||||
} else {
|
||||
i->region = R;
|
||||
}
|
||||
if (window->type() == FL_DOUBLE_WINDOW) ValidateRgn(hWnd,0);
|
||||
else ValidateRgn(hWnd,i->region);
|
||||
|
||||
window->clear_damage((uchar)(window->damage()|FL_DAMAGE_EXPOSE));
|
||||
// These next two statements should not be here, so that all update
|
||||
@ -739,8 +740,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
fl_save_pen();
|
||||
i->flush();
|
||||
fl_restore_pen();
|
||||
if (window->type() == FL_DOUBLE_WINDOW) ValidateRgn(hWnd,0);
|
||||
else ValidateRgn(hWnd,i->region);
|
||||
window->clear_damage();
|
||||
} return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user