Commit d3df597f authored by boliu@chromium.org's avatar boliu@chromium.org Committed by Bo Liu
Browse files

Cherry-pick: [Android WebView] Fix invalidate corner case

Cherry-pick of Chromium crrev.com/r226676

BUG: 10951963

Original description:

We can never assume that calling View invalidate will lead to a draw,
since view can be invisible, off screen, clearView, etc so draw will
be optimized out. Therefore must always ensure that the fallback tick
matches what the compositor expects, ie if compositor expects a
BeginFrame, then we must always have a pending tick.

One case where this does not hold true is if a DrawGL clip does not
cover the entire visible area, we call invalidate, set block_invalides
to true, but does not schedule a fallback tick. Until the next draw
comes, webview remains in a live lock situation that no more fallback or
invalidates will be called.

Fix by not setting block_invalidates in this case so subsequent fallback
ticks can still be scheduled.

Change-Id: I469ea26094e5e8f0c00f4c94663d776d59b6d266
parent 7211bb13
......@@ -905,7 +905,7 @@ void InProcessViewRenderer::EnsureContinuousInvalidation(
client_->PostInvalidate();
}
block_invalidates_ = true;
block_invalidates_ = compositor_needs_continuous_invalidate_;
// Unretained here is safe because the callback is cancelled when
// |fallback_tick_| is destroyed.
......
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