OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_delegated_renderer_layer_impl.h" | 5 #include "cc/test/fake_delegated_renderer_layer_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "cc/output/delegated_frame_data.h" | 8 #include "cc/output/delegated_frame_data.h" |
9 #include "cc/quads/draw_quad.h" | 9 #include "cc/quads/draw_quad.h" |
| 10 #include "cc/resources/returned_resource.h" |
10 | 11 |
11 namespace cc { | 12 namespace cc { |
12 | 13 |
13 FakeDelegatedRendererLayerImpl::FakeDelegatedRendererLayerImpl( | 14 FakeDelegatedRendererLayerImpl::FakeDelegatedRendererLayerImpl( |
14 LayerTreeImpl* tree_impl, int id) | 15 LayerTreeImpl* tree_impl, int id) |
15 : DelegatedRendererLayerImpl(tree_impl, id) {} | 16 : DelegatedRendererLayerImpl(tree_impl, id) {} |
16 | 17 |
17 FakeDelegatedRendererLayerImpl::~FakeDelegatedRendererLayerImpl() {} | 18 FakeDelegatedRendererLayerImpl::~FakeDelegatedRendererLayerImpl() {} |
18 | 19 |
19 scoped_ptr<LayerImpl> FakeDelegatedRendererLayerImpl::CreateLayerImpl( | 20 scoped_ptr<LayerImpl> FakeDelegatedRendererLayerImpl::CreateLayerImpl( |
(...skipping 18 matching lines...) Expand all Loading... |
38 | 39 |
39 DrawQuad::ResourceIteratorCallback add_resource_to_frame_callback = | 40 DrawQuad::ResourceIteratorCallback add_resource_to_frame_callback = |
40 base::Bind(&AddResourceToFrame, | 41 base::Bind(&AddResourceToFrame, |
41 delegated_frame.get()); | 42 delegated_frame.get()); |
42 for (size_t i = 0; i < delegated_frame->render_pass_list.size(); ++i) { | 43 for (size_t i = 0; i < delegated_frame->render_pass_list.size(); ++i) { |
43 RenderPass* pass = delegated_frame->render_pass_list[i]; | 44 RenderPass* pass = delegated_frame->render_pass_list[i]; |
44 for (size_t j = 0; j < pass->quad_list.size(); ++j) | 45 for (size_t j = 0; j < pass->quad_list.size(); ++j) |
45 pass->quad_list[j]->IterateResources(add_resource_to_frame_callback); | 46 pass->quad_list[j]->IterateResources(add_resource_to_frame_callback); |
46 } | 47 } |
47 | 48 |
48 TransferableResourceArray resources_for_ack; | 49 ReturnedResourceArray resources_for_ack; |
49 SetFrameData(delegated_frame.Pass(), gfx::RectF()); | 50 SetFrameData(delegated_frame.Pass(), gfx::RectF()); |
50 CollectUnusedResources(&resources_for_ack); | 51 CollectUnusedResources(&resources_for_ack); |
51 } | 52 } |
52 | 53 |
53 } // namespace cc | 54 } // namespace cc |
OLD | NEW |