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

Side by Side Diff: cc/layers/delegated_renderer_layer_unittest.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/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/layer_impl.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/delegated_renderer_layer.h" 5 #include "cc/layers/delegated_renderer_layer.h"
6 6
7 #include "cc/layers/delegated_frame_provider.h" 7 #include "cc/layers/delegated_frame_provider.h"
8 #include "cc/layers/delegated_frame_resource_collection.h" 8 #include "cc/layers/delegated_frame_resource_collection.h"
9 #include "cc/layers/solid_color_layer.h" 9 #include "cc/layers/solid_color_layer.h"
10 #include "cc/output/delegated_frame_data.h" 10 #include "cc/output/delegated_frame_data.h"
(...skipping 18 matching lines...) Expand all
29 protected: 29 protected:
30 FakeProxy proxy_; 30 FakeProxy proxy_;
31 TestSharedBitmapManager shared_bitmap_manager_; 31 TestSharedBitmapManager shared_bitmap_manager_;
32 scoped_ptr<LayerTreeHost> host_impl_; 32 scoped_ptr<LayerTreeHost> host_impl_;
33 }; 33 };
34 34
35 class DelegatedRendererLayerTestSimple : public DelegatedRendererLayerTest { 35 class DelegatedRendererLayerTestSimple : public DelegatedRendererLayerTest {
36 public: 36 public:
37 DelegatedRendererLayerTestSimple() : DelegatedRendererLayerTest() { 37 DelegatedRendererLayerTestSimple() : DelegatedRendererLayerTest() {
38 scoped_ptr<RenderPass> root_pass(RenderPass::Create()); 38 scoped_ptr<RenderPass> root_pass(RenderPass::Create());
39 root_pass->SetNew(RenderPass::Id(1, 1), 39 root_pass->SetNew(
40 gfx::Rect(1, 1), 40 RenderPassId(1, 1), gfx::Rect(1, 1), gfx::Rect(1, 1), gfx::Transform());
41 gfx::Rect(1, 1),
42 gfx::Transform());
43 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 41 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
44 frame_data->render_pass_list.push_back(root_pass.Pass()); 42 frame_data->render_pass_list.push_back(root_pass.Pass());
45 resources_ = new DelegatedFrameResourceCollection; 43 resources_ = new DelegatedFrameResourceCollection;
46 provider_ = new DelegatedFrameProvider(resources_, frame_data.Pass()); 44 provider_ = new DelegatedFrameProvider(resources_, frame_data.Pass());
47 root_layer_ = SolidColorLayer::Create(); 45 root_layer_ = SolidColorLayer::Create();
48 layer_before_ = SolidColorLayer::Create(); 46 layer_before_ = SolidColorLayer::Create();
49 delegated_renderer_layer_ = FakeDelegatedRendererLayer::Create(provider_); 47 delegated_renderer_layer_ = FakeDelegatedRendererLayer::Create(provider_);
50 } 48 }
51 49
52 protected: 50 protected:
(...skipping 16 matching lines...) Expand all
69 EXPECT_EQ(0, delegated_renderer_layer_->NumDescendantsThatDrawContent()); 67 EXPECT_EQ(0, delegated_renderer_layer_->NumDescendantsThatDrawContent());
70 EXPECT_EQ(1, root_layer_->NumDescendantsThatDrawContent()); 68 EXPECT_EQ(1, root_layer_->NumDescendantsThatDrawContent());
71 delegated_renderer_layer_->SetIsDrawable(true); 69 delegated_renderer_layer_->SetIsDrawable(true);
72 EXPECT_EQ(1000, delegated_renderer_layer_->NumDescendantsThatDrawContent()); 70 EXPECT_EQ(1000, delegated_renderer_layer_->NumDescendantsThatDrawContent());
73 EXPECT_EQ(1001, layer_before_->NumDescendantsThatDrawContent()); 71 EXPECT_EQ(1001, layer_before_->NumDescendantsThatDrawContent());
74 EXPECT_EQ(1002, root_layer_->NumDescendantsThatDrawContent()); 72 EXPECT_EQ(1002, root_layer_->NumDescendantsThatDrawContent());
75 } 73 }
76 74
77 } // namespace 75 } // namespace
78 } // namespace cc 76 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698