OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/exo/compositor_frame_sink_holder.h" |
| 6 |
| 7 #include "cc/resources/returned_resource.h" |
| 8 |
| 9 namespace exo { |
| 10 |
| 11 CompositorFrameSinkHolder::CompositorFrameSinkHolder() {} |
| 12 CompositorFrameSinkHolder::~CompositorFrameSinkHolder() {} |
| 13 |
| 14 void CompositorFrameSinkHolder::ReclaimResources( |
| 15 const cc::ReturnedResourceArray& resources) { |
| 16 for (auto& resource : resources) { |
| 17 auto it = release_callbacks_.find(resource.id); |
| 18 DCHECK(it != release_callbacks_.end()); |
| 19 it->second.second->Run(resource.sync_token, resource.lost); |
| 20 release_callbacks_.erase(it); |
| 21 } |
| 22 } |
| 23 } // namespace exo |
OLD | NEW |