| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 if (context_factory_private_) { | 246 if (context_factory_private_) { |
| 247 auto* manager = context_factory_private_->GetSurfaceManager(); | 247 auto* manager = context_factory_private_->GetSurfaceManager(); |
| 248 for (auto& client : child_frame_sinks_) { | 248 for (auto& client : child_frame_sinks_) { |
| 249 DCHECK(client.is_valid()); | 249 DCHECK(client.is_valid()); |
| 250 manager->UnregisterFrameSinkHierarchy(frame_sink_id_, client); | 250 manager->UnregisterFrameSinkHierarchy(frame_sink_id_, client); |
| 251 } | 251 } |
| 252 manager->InvalidateFrameSinkId(frame_sink_id_); | 252 manager->InvalidateFrameSinkId(frame_sink_id_); |
| 253 } | 253 } |
| 254 } | 254 } |
| 255 | 255 |
| 256 bool Compositor::IsForSubframe() { |
| 257 return false; |
| 258 } |
| 259 |
| 256 void Compositor::AddFrameSink(const cc::FrameSinkId& frame_sink_id) { | 260 void Compositor::AddFrameSink(const cc::FrameSinkId& frame_sink_id) { |
| 257 if (!context_factory_private_) | 261 if (!context_factory_private_) |
| 258 return; | 262 return; |
| 259 context_factory_private_->GetSurfaceManager()->RegisterFrameSinkHierarchy( | 263 context_factory_private_->GetSurfaceManager()->RegisterFrameSinkHierarchy( |
| 260 frame_sink_id_, frame_sink_id); | 264 frame_sink_id_, frame_sink_id); |
| 261 child_frame_sinks_.insert(frame_sink_id); | 265 child_frame_sinks_.insert(frame_sink_id); |
| 262 } | 266 } |
| 263 | 267 |
| 264 void Compositor::RemoveFrameSink(const cc::FrameSinkId& frame_sink_id) { | 268 void Compositor::RemoveFrameSink(const cc::FrameSinkId& frame_sink_id) { |
| 265 if (!context_factory_private_) | 269 if (!context_factory_private_) |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 void Compositor::TimeoutLocks() { | 601 void Compositor::TimeoutLocks() { |
| 598 // Make a copy, we're going to cause |active_locks_| to become | 602 // Make a copy, we're going to cause |active_locks_| to become |
| 599 // empty. | 603 // empty. |
| 600 std::vector<CompositorLock*> locks = active_locks_; | 604 std::vector<CompositorLock*> locks = active_locks_; |
| 601 for (auto* lock : locks) | 605 for (auto* lock : locks) |
| 602 lock->TimeoutLock(); | 606 lock->TimeoutLock(); |
| 603 DCHECK(active_locks_.empty()); | 607 DCHECK(active_locks_.empty()); |
| 604 } | 608 } |
| 605 | 609 |
| 606 } // namespace ui | 610 } // namespace ui |
| OLD | NEW |