Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 404563005: Make RenderPass::Id an isolated class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more case in mojo Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698