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

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

Issue 792383004: Run draw callback immediately if no Display is damaged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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 cbf43b5237810e353f556bbbc6bea2dc1aeaef69..b329e4dea20dd38b49495ac324ef64fa277ea742 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -372,6 +372,8 @@ void DelegatedFrameHost::SwapDelegatedFrame(
last_output_surface_id_ = output_surface_id;
}
bool immediate_ack = !compositor_;
+ pending_delegated_ack_count_++;
+
if (frame_size.IsEmpty()) {
DCHECK(frame_data->resource_list.empty());
EvictDelegatedFrame();
@@ -450,8 +452,6 @@ void DelegatedFrameHost::SwapDelegatedFrame(
if (!damage_rect_in_dip.IsEmpty())
client_->GetLayer()->OnDelegatedFrameDamage(damage_rect_in_dip);
- pending_delegated_ack_count_++;
-
if (immediate_ack) {
SendDelegatedFrameAck(output_surface_id);
} else if (!use_surfaces_) {
@@ -492,7 +492,8 @@ void DelegatedFrameHost::SendDelegatedFrameAck(uint32 output_surface_id) {
pending_delegated_ack_count_--;
}
-void DelegatedFrameHost::SurfaceDrawn(uint32 output_surface_id, bool drawn) {
+void DelegatedFrameHost::SurfaceDrawn(uint32 output_surface_id,
+ cc::SurfaceDrawStatus drawn) {
SendDelegatedFrameAck(output_surface_id);
}
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/compositor/onscreen_display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698