Index: content/browser/compositor/delegated_frame_host.cc |
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc |
index b050f87666f90d6fe3ba0352be37098e592fb820..9c313b4e386b69094d07db88381ef5f9fe44374a 100644 |
--- a/content/browser/compositor/delegated_frame_host.cc |
+++ b/content/browser/compositor/delegated_frame_host.cc |
@@ -379,7 +379,7 @@ void DelegatedFrameHost::SwapDelegatedFrame( |
} |
last_output_surface_id_ = output_surface_id; |
} |
- bool skip_frame_size_mismatch = false; |
+ bool immediate_ack = !compositor_; |
pending_delegated_ack_count_++; |
if (frame_size.IsEmpty()) { |
@@ -421,10 +421,10 @@ void DelegatedFrameHost::SwapDelegatedFrame( |
gfx::Size desired_size = client_->DelegatedFrameHostDesiredSizeInDIP(); |
if (desired_size != frame_size_in_dip && !desired_size.IsEmpty()) |
- skip_frame_size_mismatch = true; |
+ immediate_ack = true; |
cc::SurfaceFactory::DrawCallback ack_callback; |
- if (compositor_ && !skip_frame_size_mismatch) { |
+ if (compositor_ && !immediate_ack) { |
ack_callback = base::Bind(&DelegatedFrameHost::SurfaceDrawn, |
AsWeakPtr(), output_surface_id); |
} |
@@ -460,9 +460,7 @@ void DelegatedFrameHost::SwapDelegatedFrame( |
client_->DelegatedFrameHostGetLayer()->OnDelegatedFrameDamage( |
damage_rect_in_dip); |
- // Note that |compositor_| may be reset by SetShowSurface or |
- // SetShowDelegatedContent above. |
- if (!compositor_ || skip_frame_size_mismatch) { |
+ if (immediate_ack) { |
SendDelegatedFrameAck(output_surface_id); |
} else if (!use_surfaces_) { |
std::vector<ui::LatencyInfo>::const_iterator it; |