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

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

Issue 2711263004: Getting rid of immediate ack in DelegatedFrameHost (Relanding) (Closed)
Patch Set: 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 | no next file » | 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 6e291141a19b5613ba8451f562defc36a80a62c0..4a2c3b2b7226ce0ee7c13e9c26b7b323088166b8 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -443,7 +443,6 @@ void DelegatedFrameHost::SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
surface_returned_resources_.clear();
last_compositor_frame_sink_id_ = compositor_frame_sink_id;
}
- bool skip_frame = false;
pending_delegated_ack_count_++;
background_color_ = frame.metadata.root_background_color;
@@ -464,7 +463,6 @@ void DelegatedFrameHost::SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
gfx::Size desired_size = client_->DelegatedFrameHostDesiredSizeInDIP();
if (desired_size != frame_size_in_dip && !desired_size.IsEmpty()) {
- skip_frame = true;
skipped_latency_info_list_.insert(skipped_latency_info_list_.end(),
frame.metadata.latency_info.begin(),
frame.metadata.latency_info.end());
@@ -476,11 +474,8 @@ void DelegatedFrameHost::SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
skipped_latency_info_list_.clear();
}
- cc::SurfaceFactory::DrawCallback ack_callback;
- if (!skip_frame) {
- ack_callback = base::Bind(&DelegatedFrameHost::SurfaceDrawn, AsWeakPtr(),
- compositor_frame_sink_id);
- }
+ auto ack_callback = base::Bind(&DelegatedFrameHost::SurfaceDrawn,
+ AsWeakPtr(), compositor_frame_sink_id);
surface_factory_->SubmitCompositorFrame(local_surface_id_, std::move(frame),
ack_callback);
if (allocated_new_local_surface_id) {
@@ -505,12 +500,7 @@ void DelegatedFrameHost::SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
damage_rect_in_dip);
}
- if (skip_frame) {
- SendReclaimCompositorResources(compositor_frame_sink_id,
- true /* is_swap_ack */);
- }
-
- if (compositor_ && !skip_frame)
+ if (compositor_)
can_lock_compositor_ = NO_PENDING_COMMIT;
if (local_surface_id_.is_valid()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698