Commit 52e45765 authored by Saman Sami's avatar Saman Sami Committed by Commit Bot

Don't reset the deadline in DelegatedFrameHost if size hasn't changed

We should only reset the deadline when ui is resizing because OS is
guttering us anyways. In other cases use the real deadline.

Bug: 834449, 672962
Change-Id: I95a29e3cf8a508d0d1cd614df79c0e12183f1487
Reviewed-on: https://chromium-review.googlesource.com/1048206Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556600}
parent eb4c0e77
......@@ -245,8 +245,6 @@ void DelegatedFrameHost::SynchronizeVisualProperties(
if (!primary_surface_id ||
primary_surface_id->local_surface_id() != pending_local_surface_id_) {
current_frame_size_in_dip_ = pending_surface_dip_size_;
viz::SurfaceId surface_id(frame_sink_id_, pending_local_surface_id_);
#if defined(OS_WIN) || defined(USE_X11)
// On Windows and Linux, we would like to produce new content as soon as
......@@ -256,10 +254,13 @@ void DelegatedFrameHost::SynchronizeVisualProperties(
// using an infinite deadline, in which case we should respect the
// specified deadline and block UI since that's what was requested.
if (deadline_policy.policy_type() !=
cc::DeadlinePolicy::kUseInfiniteDeadline) {
cc::DeadlinePolicy::kUseInfiniteDeadline &&
!current_frame_size_in_dip_.IsEmpty() &&
current_frame_size_in_dip_ != pending_surface_dip_size_) {
deadline_policy = cc::DeadlinePolicy::UseSpecifiedDeadline(0u);
}
#endif
current_frame_size_in_dip_ = pending_surface_dip_size_;
client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface(
surface_id, current_frame_size_in_dip_, GetGutterColor(),
deadline_policy, false /* stretch_content_to_fill_bounds */);
......
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