| OLD | NEW |
| 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_FRAMESINK_MANAGER_H_ | 5 #ifndef CC_SURFACES_FRAME_SINK_MANAGER_H_ |
| 6 #define CC_SURFACES_FRAMESINK_MANAGER_H_ | 6 #define CC_SURFACES_FRAME_SINK_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <unordered_map> | 10 #include <unordered_map> |
| 11 #include <unordered_set> | 11 #include <unordered_set> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "cc/surfaces/frame_sink_id.h" | 16 #include "cc/surfaces/frame_sink_id.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // that surfaces from the child framesik will be displayed in the parent. | 61 // that surfaces from the child framesik will be displayed in the parent. |
| 62 // Children are allowed to use any begin frame source that their parent can | 62 // Children are allowed to use any begin frame source that their parent can |
| 63 // use. | 63 // use. |
| 64 void RegisterFrameSinkHierarchy(const FrameSinkId& parent_frame_sink_id, | 64 void RegisterFrameSinkHierarchy(const FrameSinkId& parent_frame_sink_id, |
| 65 const FrameSinkId& child_frame_sink_id); | 65 const FrameSinkId& child_frame_sink_id); |
| 66 void UnregisterFrameSinkHierarchy(const FrameSinkId& parent_frame_sink_id, | 66 void UnregisterFrameSinkHierarchy(const FrameSinkId& parent_frame_sink_id, |
| 67 const FrameSinkId& child_frame_sink_id); | 67 const FrameSinkId& child_frame_sink_id); |
| 68 | 68 |
| 69 // Export list of valid frame_sink_ids for SatisfyDestructionDeps in surface | 69 // Export list of valid frame_sink_ids for SatisfyDestructionDeps in surface |
| 70 // may be removed later when References replace Sequences | 70 // may be removed later when References replace Sequences |
| 71 std::unordered_set<FrameSinkId, FrameSinkIdHash>* GetValidFrameSinkIds(){ | 71 std::unordered_set<FrameSinkId, FrameSinkIdHash>* GetValidFrameSinkIds() { |
| 72 return &valid_frame_sink_ids_; | 72 return &valid_frame_sink_ids_; |
| 73 } | 73 } |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 friend class test::CompositorFrameSinkSupportTest; | 76 friend class test::CompositorFrameSinkSupportTest; |
| 77 | 77 |
| 78 void RecursivelyAttachBeginFrameSource(const FrameSinkId& frame_sink_id, | 78 void RecursivelyAttachBeginFrameSource(const FrameSinkId& frame_sink_id, |
| 79 BeginFrameSource* source); | 79 BeginFrameSource* source); |
| 80 void RecursivelyDetachBeginFrameSource(const FrameSinkId& frame_sink_id, | 80 void RecursivelyDetachBeginFrameSource(const FrameSinkId& frame_sink_id, |
| 81 BeginFrameSource* source); | 81 BeginFrameSource* source); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 112 // Set of which sources are registered to which frmesinks. Any child | 112 // Set of which sources are registered to which frmesinks. Any child |
| 113 // that is implicitly using this framesink must be reachable by the | 113 // that is implicitly using this framesink must be reachable by the |
| 114 // parent in the dag. | 114 // parent in the dag. |
| 115 std::unordered_map<BeginFrameSource*, FrameSinkId> registered_sources_; | 115 std::unordered_map<BeginFrameSource*, FrameSinkId> registered_sources_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(FrameSinkManager); | 117 DISALLOW_COPY_AND_ASSIGN(FrameSinkManager); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace cc | 120 } // namespace cc |
| 121 | 121 |
| 122 #endif // CC_SURFACES_FRAMESINK_MANAGER_H_ | 122 #endif // CC_SURFACES_FRAME_SINK_MANAGER_H_ |
| OLD | NEW |