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/layers/layer_iterator.h" | 5 #include "cc/layers/layer_iterator.h" |
6 #include "cc/output/copy_output_request.h" | 6 #include "cc/output/copy_output_request.h" |
7 #include "cc/output/copy_output_result.h" | 7 #include "cc/output/copy_output_result.h" |
8 #include "cc/test/fake_content_layer.h" | 8 #include "cc/test/fake_content_layer.h" |
9 #include "cc/test/fake_content_layer_client.h" | 9 #include "cc/test/fake_content_layer_client.h" |
10 #include "cc/test/fake_output_surface.h" | 10 #include "cc/test/fake_output_surface.h" |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 if (layer_tree_host()->source_frame_number() == 1) { | 995 if (layer_tree_host()->source_frame_number() == 1) { |
996 child_->RequestCopyOfOutput( | 996 child_->RequestCopyOfOutput( |
997 CopyOutputRequest::CreateBitmapRequest(base::Bind( | 997 CopyOutputRequest::CreateBitmapRequest(base::Bind( |
998 &LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest:: | 998 &LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest:: |
999 CopyOutputCallback, | 999 CopyOutputCallback, |
1000 base::Unretained(this)))); | 1000 base::Unretained(this)))); |
1001 } | 1001 } |
1002 } | 1002 } |
1003 | 1003 |
1004 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 1004 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
1005 LayerTreeHostImpl::FrameData* frame_data, | 1005 FrameData* frame_data, |
1006 DrawResult draw_result) override { | 1006 DrawResult draw_result) override { |
1007 LayerImpl* root = host_impl->active_tree()->root_layer(); | 1007 LayerImpl* root = host_impl->active_tree()->root_layer(); |
1008 LayerImpl* child = root->children()[0]; | 1008 LayerImpl* child = root->children()[0]; |
1009 | 1009 |
1010 bool saw_root = false; | 1010 bool saw_root = false; |
1011 bool saw_child = false; | 1011 bool saw_child = false; |
1012 for (LayerIterator<LayerImpl> it = LayerIterator<LayerImpl>::Begin( | 1012 for (LayerIterator<LayerImpl> it = LayerIterator<LayerImpl>::Begin( |
1013 frame_data->render_surface_layer_list); | 1013 frame_data->render_surface_layer_list); |
1014 it != LayerIterator<LayerImpl>::End( | 1014 it != LayerIterator<LayerImpl>::End( |
1015 frame_data->render_surface_layer_list); | 1015 frame_data->render_surface_layer_list); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 int num_draws_; | 1078 int num_draws_; |
1079 bool copy_happened_; | 1079 bool copy_happened_; |
1080 bool draw_happened_; | 1080 bool draw_happened_; |
1081 }; | 1081 }; |
1082 | 1082 |
1083 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1083 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
1084 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); | 1084 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); |
1085 | 1085 |
1086 } // namespace | 1086 } // namespace |
1087 } // namespace cc | 1087 } // namespace cc |
OLD | NEW |