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/output/delegating_renderer.h" | 5 #include "cc/output/delegating_renderer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "cc/test/fake_output_surface.h" | 9 #include "cc/test/fake_output_surface.h" |
10 #include "cc/test/layer_tree_test.h" | 10 #include "cc/test/layer_tree_test.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 EXPECT_EQ(0u, last_frame->delegated_frame_data->resource_list.size()); | 70 EXPECT_EQ(0u, last_frame->delegated_frame_data->resource_list.size()); |
71 EXPECT_EQ(1u, last_frame->delegated_frame_data->render_pass_list.size()); | 71 EXPECT_EQ(1u, last_frame->delegated_frame_data->render_pass_list.size()); |
72 | 72 |
73 EndTest(); | 73 EndTest(); |
74 } | 74 } |
75 | 75 |
76 gfx::Rect drawn_viewport_; | 76 gfx::Rect drawn_viewport_; |
77 }; | 77 }; |
78 | 78 |
79 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(DelegatingRendererTestDraw); | 79 SINGLE_AND_MULTI_THREAD_TEST_F(DelegatingRendererTestDraw); |
80 | 80 |
81 class DelegatingRendererTestResources : public DelegatingRendererTest { | 81 class DelegatingRendererTestResources : public DelegatingRendererTest { |
82 public: | 82 public: |
83 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 83 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
84 | 84 |
85 void AfterTest() override {} | 85 void AfterTest() override {} |
86 | 86 |
87 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 87 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
88 LayerTreeHostImpl::FrameData* frame, | 88 LayerTreeHostImpl::FrameData* frame, |
89 DrawResult draw_result) override { | 89 DrawResult draw_result) override { |
(...skipping 28 matching lines...) Expand all Loading... |
118 // mask resource used when drawing the child render pass, as well as its | 118 // mask resource used when drawing the child render pass, as well as its |
119 // replica (it's added twice). The number 10 may change if | 119 // replica (it's added twice). The number 10 may change if |
120 // AppendOneOfEveryQuadType() is updated, and the value here should be | 120 // AppendOneOfEveryQuadType() is updated, and the value here should be |
121 // updated accordingly. | 121 // updated accordingly. |
122 EXPECT_EQ(22u, last_frame->delegated_frame_data->resource_list.size()); | 122 EXPECT_EQ(22u, last_frame->delegated_frame_data->resource_list.size()); |
123 | 123 |
124 EndTest(); | 124 EndTest(); |
125 } | 125 } |
126 }; | 126 }; |
127 | 127 |
128 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( | 128 SINGLE_AND_MULTI_THREAD_TEST_F(DelegatingRendererTestResources); |
129 DelegatingRendererTestResources); | |
130 | 129 |
131 } // namespace cc | 130 } // namespace cc |
OLD | NEW |