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

Unified Diff: cc/surfaces/display_scheduler.h

Issue 1251693002: cc: Consider Surface active if frame received recently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: active_child_surface_ids_ Created 5 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
« no previous file with comments | « no previous file | cc/surfaces/display_scheduler.cc » ('j') | cc/surfaces/display_scheduler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display_scheduler.h
diff --git a/cc/surfaces/display_scheduler.h b/cc/surfaces/display_scheduler.h
index bc509c7b1caa080107b07c9e2bbeb63bbea8a931..b4005210d5e0c387ad30d93c95679948d37fd169 100644
--- a/cc/surfaces/display_scheduler.h
+++ b/cc/surfaces/display_scheduler.h
@@ -54,6 +54,11 @@ class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase {
void OnBeginFrameDeadline();
void DrawAndSwap();
+ std::set<SurfaceId>& CurrentActiveChildSurfaceIDs();
+ void UpdateFutureActiveChildSurfaceIDs(SurfaceId surface_id);
+ void ClearActiveSurfaces();
+ void UpdateActiveSurfaces();
+
DisplaySchedulerClient* client_;
BeginFrameSource* begin_frame_source_;
base::SingleThreadTaskRunner* task_runner_;
@@ -76,11 +81,12 @@ class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase {
SurfaceId root_surface_id_;
bool root_surface_damaged_;
- bool expect_damage_from_root_surface_;
+ bool root_surface_active_;
+ static const int kActiveChildSurfaceIdsSize = 3;
sunnyps 2015/07/23 21:10:38 nit: kNumFramesSurfaceIsActive?
brianderson 2015/07/23 22:21:49 Done.
std::set<SurfaceId> child_surface_ids_damaged_;
- std::set<SurfaceId> child_surface_ids_damaged_prev_;
- std::vector<SurfaceId> child_surface_ids_to_expect_damage_from_;
+ std::set<SurfaceId> active_child_surface_ids_[kActiveChildSurfaceIdsSize];
+ int current_active_child_surface_ids_index_;
base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_;
« no previous file with comments | « no previous file | cc/surfaces/display_scheduler.cc » ('j') | cc/surfaces/display_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698