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

Side by Side Diff: cc/surfaces/surface_manager.h

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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
« no previous file with comments | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 Surface* GetSurfaceForId(SurfaceId surface_id); 35 Surface* GetSurfaceForId(SurfaceId surface_id);
36 36
37 void AddObserver(SurfaceDamageObserver* obs) { 37 void AddObserver(SurfaceDamageObserver* obs) {
38 observer_list_.AddObserver(obs); 38 observer_list_.AddObserver(obs);
39 } 39 }
40 40
41 void RemoveObserver(SurfaceDamageObserver* obs) { 41 void RemoveObserver(SurfaceDamageObserver* obs) {
42 observer_list_.RemoveObserver(obs); 42 observer_list_.RemoveObserver(obs);
43 } 43 }
44 44
45 void SurfaceModified(SurfaceId surface_id); 45 bool SurfaceModified(SurfaceId surface_id);
46 46
47 // A frame for a surface satisfies a set of sequence numbers in a particular 47 // A frame for a surface satisfies a set of sequence numbers in a particular
48 // id namespace. 48 // id namespace.
49 void DidSatisfySequences(uint32_t id_namespace, 49 void DidSatisfySequences(uint32_t id_namespace,
50 std::vector<uint32_t>* sequence); 50 std::vector<uint32_t>* sequence);
51 51
52 private: 52 private:
53 void SearchForSatisfaction(); 53 void SearchForSatisfaction();
54 54
55 typedef base::hash_map<SurfaceId, Surface*> SurfaceMap; 55 typedef base::hash_map<SurfaceId, Surface*> SurfaceMap;
56 SurfaceMap surface_map_; 56 SurfaceMap surface_map_;
57 ObserverList<SurfaceDamageObserver> observer_list_; 57 ObserverList<SurfaceDamageObserver> observer_list_;
58 base::ThreadChecker thread_checker_; 58 base::ThreadChecker thread_checker_;
59 59
60 // List of surfaces to be destroyed, along with what sequences they're still 60 // List of surfaces to be destroyed, along with what sequences they're still
61 // waiting on. 61 // waiting on.
62 typedef std::list<Surface*> SurfaceDestroyList; 62 typedef std::list<Surface*> SurfaceDestroyList;
63 SurfaceDestroyList surfaces_to_destroy_; 63 SurfaceDestroyList surfaces_to_destroy_;
64 64
65 // Set of SurfaceSequences that have been satisfied by a frame but not yet 65 // Set of SurfaceSequences that have been satisfied by a frame but not yet
66 // waited on. 66 // waited on.
67 base::hash_set<SurfaceSequence> satisfied_sequences_; 67 base::hash_set<SurfaceSequence> satisfied_sequences_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); 69 DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
70 }; 70 };
71 71
72 } // namespace cc 72 } // namespace cc
73 73
74 #endif // CC_SURFACES_SURFACE_MANAGER_H_ 74 #endif // CC_SURFACES_SURFACE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698