Commit 021283be authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

mac: disable frame-resize shadow invalidate hack under test

This specific hack, which forces a WindowServer shadow update by
resizing a window briefly, is the current leading suspect in issue
899286.

Here are the hard facts we have:
1) 899286 is a WindowServer crash caused by software-compositing of
   layers for window shadows in response to a window resize
2) This hack is forcing WindowServer to rebuild shadows when it
   ordinarily wouldn't by synthesizing a window resize

The coincidence is pretty strong here, so let's speculatively disable
this hack when running headless (i.e. under test).

Bug: 899286
Change-Id: I26c9cbddef08d7213a3f545de5e666cd2307d93d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1974513Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726087}
parent c3cdada0
......@@ -240,9 +240,11 @@ bool AreWindowServerEffectsDisabled() {
// update to the window size, and then undoing it, seems to fix the problem.
// See http://crbug.com/436884.
// TODO(tapted): Find a better fix (this is horrible).
NSRect frame = [_window frame];
[_window setFrame:NSInsetRect(frame, 1, 1) display:NO animate:NO];
[_window setFrame:frame display:NO animate:NO];
if (!AreWindowServerEffectsDisabled()) {
NSRect frame = [_window frame];
[_window setFrame:NSInsetRect(frame, 1, 1) display:NO animate:NO];
[_window setFrame:frame display:NO animate:NO];
}
return;
}
[self setWindowStateForValue:[self currentValue]];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment