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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_SURFACES_SURFACE_MANAGER_H_ 5 #ifndef CC_SURFACES_SURFACE_MANAGER_H_
6 #define CC_SURFACES_SURFACE_MANAGER_H_ 6 #define CC_SURFACES_SURFACE_MANAGER_H_
7 7
8 #include <set>
jamesr 2014/08/11 22:04:43 not needed
9
8 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/observer_list.h"
13 #include "cc/surfaces/surface_damage_observer.h"
10 #include "cc/surfaces/surface_id.h" 14 #include "cc/surfaces/surface_id.h"
11 #include "cc/surfaces/surfaces_export.h" 15 #include "cc/surfaces/surfaces_export.h"
12 16
13 namespace cc { 17 namespace cc {
14 class CompositorFrame; 18 class CompositorFrame;
15 class Surface; 19 class Surface;
16 20
17 class CC_SURFACES_EXPORT SurfaceManager { 21 class CC_SURFACES_EXPORT SurfaceManager {
18 public: 22 public:
19 SurfaceManager(); 23 SurfaceManager();
20 ~SurfaceManager(); 24 ~SurfaceManager();
21 25
22 void RegisterSurface(Surface* surface); 26 void RegisterSurface(Surface* surface);
23 void DeregisterSurface(SurfaceId surface_id); 27 void DeregisterSurface(SurfaceId surface_id);
24 28
25 Surface* GetSurfaceForId(SurfaceId surface_id); 29 Surface* GetSurfaceForId(SurfaceId surface_id);
26 30
31 void AddObserver(SurfaceDamageObserver* obs) {
32 observer_list_.AddObserver(obs);
33 }
34
35 void RemoveObserver(SurfaceDamageObserver* obs) {
36 observer_list_.RemoveObserver(obs);
37 }
38
39 void SurfaceModified(SurfaceId surface_id);
40
27 private: 41 private:
28 typedef base::hash_map<SurfaceId, Surface*> SurfaceMap; 42 typedef base::hash_map<SurfaceId, Surface*> SurfaceMap;
29 SurfaceMap surface_map_; 43 SurfaceMap surface_map_;
44 ObserverList<SurfaceDamageObserver> observer_list_;
30 45
31 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); 46 DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
32 }; 47 };
33 48
34 } // namespace cc 49 } // namespace cc
35 50
36 #endif // CC_SURFACES_SURFACE_MANAGER_H_ 51 #endif // CC_SURFACES_SURFACE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698