Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
aw: Ensure fallback tick unsets |block_invalidates_|
Browse files Browse the repository at this point in the history
Currently, if |compositor_needs_continuous_invalidate_| is unset before
PostFallbackTick or FallbackTickFired, then the fallback ticks are
cancelled, but we never unset |block_invalidates_|, which will block
invalidates indefinitely.

Fix is simply always unset |block_invalidates_| even if we skip
the fallback tick.

BUG=408779

Review URL: https://codereview.chromium.org/512403002

Cr-Commit-Position: refs/heads/master@{#292511}
  • Loading branch information
boliu authored and Commit bot committed Aug 29, 2014
1 parent 56c93e4 commit d3ba720
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion android_webview/browser/browser_view_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,9 @@ void BrowserViewRenderer::PostFallbackTick() {
FROM_HERE,
fallback_tick_fired_.callback(),
base::TimeDelta::FromMilliseconds(kFallbackTickTimeoutInMilliseconds));
} else {
// Pretend we just composited to unblock further invalidates.
DidComposite();
}
}

Expand All @@ -729,8 +732,12 @@ void BrowserViewRenderer::FallbackTickFired() {
// This should only be called if OnDraw or DrawGL did not come in time, which
// means block_invalidates_ must still be true.
DCHECK(block_invalidates_);
if (compositor_needs_continuous_invalidate_ && compositor_)
if (compositor_needs_continuous_invalidate_ && compositor_) {
ForceFakeCompositeSW();
} else {
// Pretend we just composited to unblock further invalidates.
DidComposite();
}
}

void BrowserViewRenderer::ForceFakeCompositeSW() {
Expand Down

0 comments on commit d3ba720

Please sign in to comment.