Commit 67437a7f authored by boliu@chromium.org's avatar boliu@chromium.org

[Android WebView] Only throttle fallback tick

When throttling, either when paused or when in background, only throttle
fallback tick. There are apps relying on the fact that invalidates are
not throttled when paused. When in background, framework should take
care of not calling back with draw for invalidates.

Internal bug b/11230312

BUG=
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232909 0039d316-1c4b-4281-b951-d872f2087c98
parent a8de4aa7
......@@ -886,9 +886,7 @@ void InProcessViewRenderer::EnsureContinuousInvalidation(
// This method should be called again when any of these conditions change.
bool need_invalidate =
compositor_needs_continuous_invalidate_ || invalidate_ignore_compositor;
bool throttle = (is_paused_ && !on_new_picture_enable_) ||
(attached_to_window_ && !window_visible_);
if (!need_invalidate || block_invalidates_ || throttle)
if (!need_invalidate || block_invalidates_)
return;
if (draw_info) {
......@@ -901,6 +899,11 @@ void InProcessViewRenderer::EnsureContinuousInvalidation(
client_->PostInvalidate();
}
bool throttle_fallback_tick = (is_paused_ && !on_new_picture_enable_) ||
(attached_to_window_ && !window_visible_);
if (throttle_fallback_tick)
return;
block_invalidates_ = compositor_needs_continuous_invalidate_;
// Unretained here is safe because the callback is cancelled when
......
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