Chromium Code Reviews| 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/surface_manager.h" | 5 #include "cc/surfaces/surface_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 } | 113 } |
| 114 | 114 |
| 115 void SurfaceManager::SatisfySequence(const SurfaceSequence& sequence) { | 115 void SurfaceManager::SatisfySequence(const SurfaceSequence& sequence) { |
| 116 DCHECK(thread_checker_.CalledOnValidThread()); | 116 DCHECK(thread_checker_.CalledOnValidThread()); |
| 117 DCHECK_EQ(lifetime_type_, LifetimeType::SEQUENCES); | 117 DCHECK_EQ(lifetime_type_, LifetimeType::SEQUENCES); |
| 118 satisfied_sequences_.insert(sequence); | 118 satisfied_sequences_.insert(sequence); |
| 119 GarbageCollectSurfaces(); | 119 GarbageCollectSurfaces(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void SurfaceManager::RegisterFrameSinkId(const FrameSinkId& frame_sink_id) { | 122 void SurfaceManager::RegisterFrameSinkId(const FrameSinkId& frame_sink_id) { |
| 123 bool inserted = valid_frame_sink_ids_.insert(frame_sink_id).second; | 123 valid_frame_sink_ids_.insert(frame_sink_id); |
|
danakj
2017/01/31 20:19:17
Why this change?
Alex Z.
2017/01/31 21:09:30
From fsamuel's earlier comment:
ui::Compositor Re
danakj
2017/01/31 21:49:40
Can we have a parameter passed around maybe saying
danakj
2017/02/03 18:48:43
I'm not seeing anything in the replies to this, di
Alex Z.
2017/02/03 19:32:20
I added a flag to CompositorFrameSinkSupport in pa
| |
| 124 DCHECK(inserted); | |
| 125 } | 124 } |
| 126 | 125 |
| 127 void SurfaceManager::InvalidateFrameSinkId(const FrameSinkId& frame_sink_id) { | 126 void SurfaceManager::InvalidateFrameSinkId(const FrameSinkId& frame_sink_id) { |
| 128 valid_frame_sink_ids_.erase(frame_sink_id); | 127 valid_frame_sink_ids_.erase(frame_sink_id); |
| 129 GarbageCollectSurfaces(); | 128 GarbageCollectSurfaces(); |
| 130 } | 129 } |
| 131 | 130 |
| 132 const SurfaceId& SurfaceManager::GetRootSurfaceId() const { | 131 const SurfaceId& SurfaceManager::GetRootSurfaceId() const { |
| 133 return root_surface_id_; | 132 return root_surface_id_; |
| 134 } | 133 } |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 614 std::vector<SurfaceId> children(iter->second.begin(), iter->second.end()); | 613 std::vector<SurfaceId> children(iter->second.begin(), iter->second.end()); |
| 615 std::sort(children.begin(), children.end()); | 614 std::sort(children.begin(), children.end()); |
| 616 | 615 |
| 617 for (const SurfaceId& child_id : children) | 616 for (const SurfaceId& child_id : children) |
| 618 SurfaceReferencesToStringImpl(child_id, indent + " ", str); | 617 SurfaceReferencesToStringImpl(child_id, indent + " ", str); |
| 619 } | 618 } |
| 620 } | 619 } |
| 621 #endif // DCHECK_IS_ON() | 620 #endif // DCHECK_IS_ON() |
| 622 | 621 |
| 623 } // namespace cc | 622 } // namespace cc |
| OLD | NEW |