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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 2140783002: services/ui: Detect when a video is playing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index f4681466f26aecd04c396595e05641969b20d671..b6b9fa668fcc9fac0b151d497e74dac47d16b96c 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -702,6 +702,8 @@ gfx::Rect SurfaceAggregator::PrewalkTree(const SurfaceId& surface_id,
}
referenced_surfaces_.erase(it);
+ if (!damage_rect.IsEmpty() && surface_frame.metadata.may_contain_video)
enne (OOO) 2016/07/25 19:17:35 Why does the damage rect come into play here? If y
sadrul 2016/07/26 04:39:20 Yes. The window server will need to notify observe
enne (OOO) 2016/07/26 21:43:54 Hmm, makes sense for paused videos, thanks for the
+ result->may_contain_video = true;
return damage_rect;
}
@@ -786,6 +788,7 @@ CompositorFrame SurfaceAggregator::Aggregate(const SurfaceId& surface_id) {
PrewalkTree(surface_id, false, RenderPassId(), &prewalk_result);
PropagateCopyRequestPasses();
has_copy_requests_ = !copy_request_passes_.empty();
+ frame.metadata.may_contain_video = prewalk_result.may_contain_video;
CopyUndrawnSurfaces(&prewalk_result);
SurfaceSet::iterator it = referenced_surfaces_.insert(surface_id).first;

Powered by Google App Engine
This is Rietveld 408576698