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

Unified Diff: cc/surfaces/surface_manager.h

Issue 432093003: Enqueuing new frames in a Surface should cause Displays to reaggregate it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « cc/surfaces/surface_factory.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_manager.h
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h
index 40e55f1fc7ee1f522b550cb392fe6e79f7ca2399..202dfe3dde68bbda1fa92368683f56237bdec81b 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -7,6 +7,8 @@
#include "base/containers/hash_tables.h"
#include "base/macros.h"
+#include "base/observer_list.h"
+#include "cc/surfaces/surface_damage_observer.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surfaces_export.h"
@@ -24,9 +26,20 @@ class CC_SURFACES_EXPORT SurfaceManager {
Surface* GetSurfaceForId(SurfaceId surface_id);
+ void AddObserver(SurfaceDamageObserver* obs) {
+ observer_list_.AddObserver(obs);
+ }
+
+ void RemoveObserver(SurfaceDamageObserver* obs) {
+ observer_list_.RemoveObserver(obs);
+ }
+
+ void SurfaceModified(SurfaceId surface_id);
+
private:
typedef base::hash_map<SurfaceId, Surface*> SurfaceMap;
SurfaceMap surface_map_;
+ ObserverList<SurfaceDamageObserver> observer_list_;
DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
};
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698