| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 for (auto iter = begin_iter; iter != end_iter; ++iter) | 400 for (auto iter = begin_iter; iter != end_iter; ++iter) |
| 401 temporary_references_.erase(SurfaceId(frame_sink_id, *iter)); | 401 temporary_references_.erase(SurfaceId(frame_sink_id, *iter)); |
| 402 frame_sink_temp_refs.erase(begin_iter, end_iter); | 402 frame_sink_temp_refs.erase(begin_iter, end_iter); |
| 403 | 403 |
| 404 // If last temporary reference is removed for |frame_sink_id| then cleanup | 404 // If last temporary reference is removed for |frame_sink_id| then cleanup |
| 405 // range tracking map entry. | 405 // range tracking map entry. |
| 406 if (frame_sink_temp_refs.empty()) | 406 if (frame_sink_temp_refs.empty()) |
| 407 temporary_reference_ranges_.erase(frame_sink_id); | 407 temporary_reference_ranges_.erase(frame_sink_id); |
| 408 } | 408 } |
| 409 | 409 |
| 410 void SurfaceManager::RegisterSurfaceFactoryClient( | 410 void SurfaceManager::RegisterFrameSinkManagerClient( |
| 411 const FrameSinkId& frame_sink_id, | 411 const FrameSinkId& frame_sink_id, |
| 412 SurfaceFactoryClient* client) { | 412 FrameSinkManagerClient* client) { |
| 413 framesink_manager_.RegisterSurfaceFactoryClient(frame_sink_id, client); | 413 framesink_manager_.RegisterSurfaceFactoryClient(frame_sink_id, client); |
| 414 } | 414 } |
| 415 | 415 |
| 416 void SurfaceManager::UnregisterSurfaceFactoryClient( | 416 void SurfaceManager::UnregisterFrameSinkManagerClient( |
| 417 const FrameSinkId& frame_sink_id) { | 417 const FrameSinkId& frame_sink_id) { |
| 418 framesink_manager_.UnregisterSurfaceFactoryClient(frame_sink_id); | 418 framesink_manager_.UnregisterSurfaceFactoryClient(frame_sink_id); |
| 419 } | 419 } |
| 420 | 420 |
| 421 void SurfaceManager::RegisterBeginFrameSource( | 421 void SurfaceManager::RegisterBeginFrameSource( |
| 422 BeginFrameSource* source, | 422 BeginFrameSource* source, |
| 423 const FrameSinkId& frame_sink_id) { | 423 const FrameSinkId& frame_sink_id) { |
| 424 framesink_manager_.RegisterBeginFrameSource(source, frame_sink_id); | 424 framesink_manager_.RegisterBeginFrameSource(source, frame_sink_id); |
| 425 } | 425 } |
| 426 | 426 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 std::vector<SurfaceId> children(iter->second.begin(), iter->second.end()); | 524 std::vector<SurfaceId> children(iter->second.begin(), iter->second.end()); |
| 525 std::sort(children.begin(), children.end()); | 525 std::sort(children.begin(), children.end()); |
| 526 | 526 |
| 527 for (const SurfaceId& child_id : children) | 527 for (const SurfaceId& child_id : children) |
| 528 SurfaceReferencesToStringImpl(child_id, indent + " ", str); | 528 SurfaceReferencesToStringImpl(child_id, indent + " ", str); |
| 529 } | 529 } |
| 530 } | 530 } |
| 531 #endif // DCHECK_IS_ON() | 531 #endif // DCHECK_IS_ON() |
| 532 | 532 |
| 533 } // namespace cc | 533 } // namespace cc |
| OLD | NEW |