OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/test/fake_output_surface.h" | 5 #include "cc/test/fake_output_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "cc/output/compositor_frame_ack.h" | 9 #include "cc/output/compositor_frame_ack.h" |
10 #include "cc/output/output_surface_client.h" | 10 #include "cc/output/output_surface_client.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 void FakeOutputSurface::ReturnResource(unsigned id, CompositorFrameAck* ack) { | 127 void FakeOutputSurface::ReturnResource(unsigned id, CompositorFrameAck* ack) { |
128 TransferableResourceArray::iterator it; | 128 TransferableResourceArray::iterator it; |
129 for (it = resources_held_by_parent_.begin(); | 129 for (it = resources_held_by_parent_.begin(); |
130 it != resources_held_by_parent_.end(); | 130 it != resources_held_by_parent_.end(); |
131 ++it) { | 131 ++it) { |
132 if (it->id == id) | 132 if (it->id == id) |
133 break; | 133 break; |
134 } | 134 } |
135 DCHECK(it != resources_held_by_parent_.end()); | 135 DCHECK(it != resources_held_by_parent_.end()); |
136 ack->resources.push_back(*it); | 136 ack->resources.push_back(it->Return()); |
137 resources_held_by_parent_.erase(it); | 137 resources_held_by_parent_.erase(it); |
138 } | 138 } |
139 | 139 |
140 } // namespace cc | 140 } // namespace cc |
OLD | NEW |