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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
9 #include "cc/layers/delegated_frame_provider.h" | 9 #include "cc/layers/delegated_frame_provider.h" |
10 #include "cc/layers/delegated_frame_resource_collection.h" | 10 #include "cc/layers/delegated_frame_resource_collection.h" |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 | 693 |
694 virtual void SetupTree() OVERRIDE { | 694 virtual void SetupTree() OVERRIDE { |
695 gpu::gles2::GLES2Interface* gl = | 695 gpu::gles2::GLES2Interface* gl = |
696 child_output_surface_->context_provider()->ContextGL(); | 696 child_output_surface_->context_provider()->ContextGL(); |
697 | 697 |
698 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); | 698 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); |
699 | 699 |
700 scoped_ptr<TestRenderPass> pass_for_quad = TestRenderPass::Create(); | 700 scoped_ptr<TestRenderPass> pass_for_quad = TestRenderPass::Create(); |
701 pass_for_quad->SetNew( | 701 pass_for_quad->SetNew( |
702 // AppendOneOfEveryQuadType() makes a RenderPass quad with this id. | 702 // AppendOneOfEveryQuadType() makes a RenderPass quad with this id. |
703 RenderPass::Id(2, 1), | 703 RenderPassId(2, 1), |
704 gfx::Rect(0, 0, 10, 10), | 704 gfx::Rect(0, 0, 10, 10), |
705 gfx::Rect(0, 0, 10, 10), | 705 gfx::Rect(0, 0, 10, 10), |
706 gfx::Transform()); | 706 gfx::Transform()); |
707 | 707 |
708 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); | 708 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); |
709 pass->SetNew(RenderPass::Id(1, 1), | 709 pass->SetNew(RenderPassId(1, 1), |
710 gfx::Rect(0, 0, 10, 10), | 710 gfx::Rect(0, 0, 10, 10), |
711 gfx::Rect(0, 0, 10, 10), | 711 gfx::Rect(0, 0, 10, 10), |
712 gfx::Transform()); | 712 gfx::Transform()); |
713 pass->AppendOneOfEveryQuadType(child_resource_provider_.get(), | 713 pass->AppendOneOfEveryQuadType(child_resource_provider_.get(), |
714 RenderPass::Id(2, 1)); | 714 RenderPassId(2, 1)); |
715 | 715 |
716 frame_data->render_pass_list.push_back(pass_for_quad.PassAs<RenderPass>()); | 716 frame_data->render_pass_list.push_back(pass_for_quad.PassAs<RenderPass>()); |
717 frame_data->render_pass_list.push_back(pass.PassAs<RenderPass>()); | 717 frame_data->render_pass_list.push_back(pass.PassAs<RenderPass>()); |
718 | 718 |
719 delegated_resource_collection_ = new DelegatedFrameResourceCollection; | 719 delegated_resource_collection_ = new DelegatedFrameResourceCollection; |
720 delegated_frame_provider_ = new DelegatedFrameProvider( | 720 delegated_frame_provider_ = new DelegatedFrameProvider( |
721 delegated_resource_collection_.get(), frame_data.Pass()); | 721 delegated_resource_collection_.get(), frame_data.Pass()); |
722 | 722 |
723 ResourceProvider::ResourceId resource = | 723 ResourceProvider::ResourceId resource = |
724 child_resource_provider_->CreateResource( | 724 child_resource_provider_->CreateResource( |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 virtual void AfterTest() OVERRIDE {} | 1535 virtual void AfterTest() OVERRIDE {} |
1536 | 1536 |
1537 bool deferred_; | 1537 bool deferred_; |
1538 }; | 1538 }; |
1539 | 1539 |
1540 // TODO(danakj): We don't use scheduler with SingleThreadProxy yet. | 1540 // TODO(danakj): We don't use scheduler with SingleThreadProxy yet. |
1541 MULTI_THREAD_TEST_F(LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1541 MULTI_THREAD_TEST_F(LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
1542 | 1542 |
1543 } // namespace | 1543 } // namespace |
1544 } // namespace cc | 1544 } // namespace cc |
OLD | NEW |