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 #include "cc/surfaces/framesink_manager.h" | 5 #include "cc/surfaces/frame_sink_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "cc/surfaces/framesink_manager_client.h" | 11 #include "cc/surfaces/frame_sink_manager_client.h" |
12 #include "cc/surfaces/surface_factory_client.h" | 12 #include "cc/surfaces/surface_factory_client.h" |
13 | 13 |
14 #if DCHECK_IS_ON() | 14 #if DCHECK_IS_ON() |
15 #include <sstream> | 15 #include <sstream> |
16 #endif | 16 #endif |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 | 19 |
20 FrameSinkManager::FrameSinkSourceMapping::FrameSinkSourceMapping() | 20 FrameSinkManager::FrameSinkSourceMapping::FrameSinkSourceMapping() |
21 : source(nullptr) {} | 21 : source(nullptr) {} |
22 | 22 |
23 FrameSinkManager::FrameSinkSourceMapping::FrameSinkSourceMapping( | 23 FrameSinkManager::FrameSinkSourceMapping::FrameSinkSourceMapping( |
24 const FrameSinkSourceMapping& other) = default; | 24 const FrameSinkSourceMapping& other) = default; |
25 | 25 |
26 FrameSinkManager::FrameSinkSourceMapping::~FrameSinkSourceMapping() { | 26 FrameSinkManager::FrameSinkSourceMapping::~FrameSinkSourceMapping() {} |
27 } | |
28 | 27 |
29 FrameSinkManager::FrameSinkManager() {} | 28 FrameSinkManager::FrameSinkManager() {} |
30 | 29 |
31 FrameSinkManager::~FrameSinkManager() { | 30 FrameSinkManager::~FrameSinkManager() { |
32 // All surface factory clients should be unregistered prior to SurfaceManager | 31 // All surface factory clients should be unregistered prior to SurfaceManager |
33 // destruction. | 32 // destruction. |
34 DCHECK_EQ(clients_.size(), 0u); | 33 DCHECK_EQ(clients_.size(), 0u); |
35 DCHECK_EQ(registered_sources_.size(), 0u); | 34 DCHECK_EQ(registered_sources_.size(), 0u); |
36 } | 35 } |
37 | 36 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 if (!parent_source) | 222 if (!parent_source) |
224 return; | 223 return; |
225 | 224 |
226 // TODO(enne): these walks could be done in one step. | 225 // TODO(enne): these walks could be done in one step. |
227 RecursivelyDetachBeginFrameSource(child_frame_sink_id, parent_source); | 226 RecursivelyDetachBeginFrameSource(child_frame_sink_id, parent_source); |
228 for (auto source_iter : registered_sources_) | 227 for (auto source_iter : registered_sources_) |
229 RecursivelyAttachBeginFrameSource(source_iter.second, source_iter.first); | 228 RecursivelyAttachBeginFrameSource(source_iter.second, source_iter.first); |
230 } | 229 } |
231 | 230 |
232 } // namespace cc | 231 } // namespace cc |
OLD | NEW |