Skip to content

Commit

Permalink
Speculative Revert of 185683. Appears to have regressed:
Browse files Browse the repository at this point in the history
http://chromium-perf.appspot.com/?tab=xp-release-single-core&graph=times&rev=185847&history=150&master=ChromiumPerf&testSuite=page_cycler_intl2&details=true
as well as the page_cycler_intl1, morejs, and moz tests on the same bot and on
the other XP and Win7 perf bots.

Reverting this CL because the regression does not appear on non-windows bots,
and this is the only windows-specific CL in the regression range.

> Redraw after ScopedRedrawLock to fix DefWindowProc artifacts.
> 
> Invalidate windows after lifting ScopedRedrawLock.
> (this eliminates all DefWindowProc artifacts for me!)
> 
> Use DefWindowProcWithRedrawLock for WM_SETCURSOR.
> This hopefully won't regress http://crbug.com/97808
> For more information see http://crrev.com/102708
> 
> This should be carefully tested on Win7/Vista/XP.
> 
> BUG=89820,97808,113127,178600
> TEST=No Win7/Vista/XP opaque-frame (classic theme) painting glitches.
> R=sky@chromium.org,ben@chromium.org
> 
> Review URL: https://chromiumcodereview.appspot.com/12380070

TBR=msw@chromium.org
Review URL: https://codereview.chromium.org/12379075

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185911 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
agable@chromium.org committed Mar 4, 2013
1 parent a038acf commit 403091a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ui/views/win/hwnd_message_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,8 @@ class HWNDMessageHandler::ScopedRedrawLock {
}

~ScopedRedrawLock() {
if (!cancel_unlock_ && was_visible_ && ::IsWindow(hwnd_)) {
if (!cancel_unlock_ && was_visible_ && ::IsWindow(hwnd_))
owner_->UnlockUpdates(force_);
// Invalidate the window to paint over any outdated window regions asap,
// particularly graphical artifacts that arise from DefWindowProc usage.
InvalidateRect(hwnd_, NULL, FALSE);
}
}

// Cancel the unlock operation, call this if the Widget is being destroyed.
Expand Down Expand Up @@ -1901,7 +1897,12 @@ LRESULT HWNDMessageHandler::OnReflectedMessage(UINT message,
LRESULT HWNDMessageHandler::OnSetCursor(UINT message,
WPARAM w_param,
LPARAM l_param) {
return DefWindowProcWithRedrawLock(message, w_param, l_param);
// Using ScopedRedrawLock here frequently allows content behind this window to
// paint in front of this window, causing glaring rendering artifacts.
// If omitting ScopedRedrawLock here triggers caption rendering artifacts via
// DefWindowProc message handling, we'll need to find a better solution.
SetMsgHandled(FALSE);
return 0;
}

void HWNDMessageHandler::OnSetFocus(HWND last_focused_window) {
Expand Down

0 comments on commit 403091a

Please sign in to comment.