Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1268)

Unified Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 2708423002: DelegatedFrameHost should not send immediate ack when compositor is null (Closed)
Patch Set: Remove unit test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/delegated_frame_host.cc
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 6fa63cc3e0e09060f4d366b71ea16a0b84d819e4..2c79bf0a25ec1e30a90a1b0c6a3a3c65ec2f53b6 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -451,7 +451,6 @@ void DelegatedFrameHost::SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
background_color_ = frame.metadata.root_background_color;
- bool did_send_ack_callback = false;
if (frame_size.IsEmpty()) {
DCHECK(frame.resource_list.empty());
EvictDelegatedFrame();
@@ -481,10 +480,9 @@ void DelegatedFrameHost::SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
}
cc::SurfaceFactory::DrawCallback ack_callback;
- if (compositor_ && !skip_frame) {
+ if (!skip_frame) {
ack_callback = base::Bind(&DelegatedFrameHost::SurfaceDrawn, AsWeakPtr(),
compositor_frame_sink_id);
- did_send_ack_callback = true;
}
surface_factory_->SubmitCompositorFrame(local_surface_id_, std::move(frame),
ack_callback);
@@ -510,14 +508,14 @@ void DelegatedFrameHost::SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
damage_rect_in_dip);
}
- // Note that |compositor_| may be reset by SetShowSurface or
- // SetShowDelegatedContent above.
- if (!compositor_ || skip_frame) {
+ if (skip_frame) {
SendReclaimCompositorResources(compositor_frame_sink_id,
- !did_send_ack_callback /* is_swap_ack */);
- } else {
- can_lock_compositor_ = NO_PENDING_COMMIT;
+ true /* is_swap_ack */);
}
+
+ if (compositor_ && !skip_frame)
+ can_lock_compositor_ = NO_PENDING_COMMIT;
+
if (local_surface_id_.is_valid()) {
delegated_frame_evictor_->SwappedFrame(
client_->DelegatedFrameHostIsVisible());
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698