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

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

Issue 1900313002: DelegatedFrameHost: Prevent FrameSubscriber captures if damage_rect is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 60c10005ac273960cdfd3f5c268476719f36295c..6ea4299f297d795129ebb476927ee5d32c3698b4 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -544,7 +544,11 @@ void DelegatedFrameHost::ReturnResources(
void DelegatedFrameHost::WillDrawSurface(cc::SurfaceId id,
const gfx::Rect& damage_rect) {
- if (id != surface_id_)
+ // Frame subscribers are only interested in changes to the target surface, so
+ // do not attempt capture if |damage_rect| is empty. This prevents the draws
+ // of parent surfaces from triggering extra frame captures, which can affect
+ // smoothness.
+ if (id != surface_id_ || damage_rect.IsEmpty())
return;
AttemptFrameSubscriberCapture(damage_rect);
}
« 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