OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" | 5 #include "ui/compositor/compositor.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <deque> | 10 #include <deque> |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 if (context_factory_private_) { | 221 if (context_factory_private_) { |
222 auto* manager = context_factory_private_->GetSurfaceManager(); | 222 auto* manager = context_factory_private_->GetSurfaceManager(); |
223 for (auto& client : child_frame_sinks_) { | 223 for (auto& client : child_frame_sinks_) { |
224 DCHECK(client.is_valid()); | 224 DCHECK(client.is_valid()); |
225 manager->UnregisterFrameSinkHierarchy(frame_sink_id_, client); | 225 manager->UnregisterFrameSinkHierarchy(frame_sink_id_, client); |
226 } | 226 } |
227 manager->InvalidateFrameSinkId(frame_sink_id_); | 227 manager->InvalidateFrameSinkId(frame_sink_id_); |
228 } | 228 } |
229 } | 229 } |
230 | 230 |
| 231 bool Compositor::IsForSubframe() { |
| 232 return false; |
| 233 } |
| 234 |
231 void Compositor::AddFrameSink(const cc::FrameSinkId& frame_sink_id) { | 235 void Compositor::AddFrameSink(const cc::FrameSinkId& frame_sink_id) { |
232 if (!context_factory_private_) | 236 if (!context_factory_private_) |
233 return; | 237 return; |
234 context_factory_private_->GetSurfaceManager()->RegisterFrameSinkHierarchy( | 238 context_factory_private_->GetSurfaceManager()->RegisterFrameSinkHierarchy( |
235 frame_sink_id_, frame_sink_id); | 239 frame_sink_id_, frame_sink_id); |
236 child_frame_sinks_.insert(frame_sink_id); | 240 child_frame_sinks_.insert(frame_sink_id); |
237 } | 241 } |
238 | 242 |
239 void Compositor::RemoveFrameSink(const cc::FrameSinkId& frame_sink_id) { | 243 void Compositor::RemoveFrameSink(const cc::FrameSinkId& frame_sink_id) { |
240 if (!context_factory_private_) | 244 if (!context_factory_private_) |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 void Compositor::TimeoutLocks() { | 574 void Compositor::TimeoutLocks() { |
571 // Make a copy, we're going to cause |active_locks_| to become | 575 // Make a copy, we're going to cause |active_locks_| to become |
572 // empty. | 576 // empty. |
573 std::vector<CompositorLock*> locks = active_locks_; | 577 std::vector<CompositorLock*> locks = active_locks_; |
574 for (auto* lock : locks) | 578 for (auto* lock : locks) |
575 lock->TimeoutLock(); | 579 lock->TimeoutLock(); |
576 DCHECK(active_locks_.empty()); | 580 DCHECK(active_locks_.empty()); |
577 } | 581 } |
578 | 582 |
579 } // namespace ui | 583 } // namespace ui |
OLD | NEW |