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

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

Issue 2685393003: Surfaces: Allow parent to refer to child surfaces that don't exist yet. (Closed)
Patch Set: Rebased Created 3 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/compositor_frame_sink_support_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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 20 matching lines...) Expand all
31 #include <iosfwd> 31 #include <iosfwd>
32 #include <string> 32 #include <string>
33 #endif 33 #endif
34 34
35 namespace cc { 35 namespace cc {
36 class BeginFrameSource; 36 class BeginFrameSource;
37 class CompositorFrame; 37 class CompositorFrame;
38 class Surface; 38 class Surface;
39 class SurfaceFactoryClient; 39 class SurfaceFactoryClient;
40 40
41 namespace test {
42 class CompositorFrameSinkSupportTest;
43 }
44
41 class CC_SURFACES_EXPORT SurfaceManager { 45 class CC_SURFACES_EXPORT SurfaceManager {
42 public: 46 public:
43 enum class LifetimeType { 47 enum class LifetimeType {
44 REFERENCES, 48 REFERENCES,
45 SEQUENCES, 49 SEQUENCES,
46 }; 50 };
47 51
48 explicit SurfaceManager(LifetimeType lifetime_type = LifetimeType::SEQUENCES); 52 explicit SurfaceManager(LifetimeType lifetime_type = LifetimeType::SEQUENCES);
49 ~SurfaceManager(); 53 ~SurfaceManager();
50 54
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 158
155 scoped_refptr<SurfaceReferenceFactory> reference_factory() { 159 scoped_refptr<SurfaceReferenceFactory> reference_factory() {
156 return reference_factory_; 160 return reference_factory_;
157 } 161 }
158 162
159 bool using_surface_references() const { 163 bool using_surface_references() const {
160 return lifetime_type_ == LifetimeType::REFERENCES; 164 return lifetime_type_ == LifetimeType::REFERENCES;
161 } 165 }
162 166
163 private: 167 private:
168 friend class test::CompositorFrameSinkSupportTest;
164 friend class SurfaceManagerRefTest; 169 friend class SurfaceManagerRefTest;
165 170
166 using SurfaceIdSet = std::unordered_set<SurfaceId, SurfaceIdHash>; 171 using SurfaceIdSet = std::unordered_set<SurfaceId, SurfaceIdHash>;
167 172
168 void RecursivelyAttachBeginFrameSource(const FrameSinkId& frame_sink_id, 173 void RecursivelyAttachBeginFrameSource(const FrameSinkId& frame_sink_id,
169 BeginFrameSource* source); 174 BeginFrameSource* source);
170 void RecursivelyDetachBeginFrameSource(const FrameSinkId& frame_sink_id, 175 void RecursivelyDetachBeginFrameSource(const FrameSinkId& frame_sink_id,
171 BeginFrameSource* source); 176 BeginFrameSource* source);
172 177
173 // Returns true if |child namespace| is or has |search_frame_sink_id| as a 178 // Returns true if |child namespace| is or has |search_frame_sink_id| as a
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker_; 282 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker_;
278 283
279 base::WeakPtrFactory<SurfaceManager> weak_factory_; 284 base::WeakPtrFactory<SurfaceManager> weak_factory_;
280 285
281 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); 286 DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
282 }; 287 };
283 288
284 } // namespace cc 289 } // namespace cc
285 290
286 #endif // CC_SURFACES_SURFACE_MANAGER_H_ 291 #endif // CC_SURFACES_SURFACE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support_unittest.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698