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 "cc/test/fake_output_surface.h" | 7 #include "cc/test/fake_output_surface.h" |
8 #include "cc/test/layer_tree_test.h" | 8 #include "cc/test/layer_tree_test.h" |
9 #include "cc/test/render_pass_test_common.h" | 9 #include "cc/test/render_pass_test_common.h" |
10 #include "cc/test/render_pass_test_utils.h" | 10 #include "cc/test/render_pass_test_utils.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 class DelegatingRendererTestDraw : public DelegatingRendererTest { | 37 class DelegatingRendererTestDraw : public DelegatingRendererTest { |
38 public: | 38 public: |
39 virtual void BeginTest() OVERRIDE { | 39 virtual void BeginTest() OVERRIDE { |
40 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 4.f); | 40 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 4.f); |
41 PostSetNeedsCommitToMainThread(); | 41 PostSetNeedsCommitToMainThread(); |
42 } | 42 } |
43 | 43 |
44 virtual void AfterTest() OVERRIDE {} | 44 virtual void AfterTest() OVERRIDE {} |
45 | 45 |
46 virtual bool PrepareToDrawOnThread( | 46 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
47 LayerTreeHostImpl*, LayerTreeHostImpl::FrameData* frame, bool result) | 47 LayerTreeHostImpl::FrameData* frame, |
| 48 bool result) |
48 OVERRIDE { | 49 OVERRIDE { |
49 EXPECT_EQ(0u, output_surface_->num_sent_frames()); | 50 EXPECT_EQ(0u, output_surface_->num_sent_frames()); |
50 | 51 |
51 CompositorFrame& last_frame = output_surface_->last_sent_frame(); | 52 CompositorFrame& last_frame = output_surface_->last_sent_frame(); |
52 EXPECT_FALSE(last_frame.delegated_frame_data); | 53 EXPECT_FALSE(last_frame.delegated_frame_data); |
53 EXPECT_FALSE(last_frame.gl_frame_data); | 54 EXPECT_FALSE(last_frame.gl_frame_data); |
54 EXPECT_EQ(0.f, last_frame.metadata.min_page_scale_factor); | 55 EXPECT_EQ(0.f, last_frame.metadata.min_page_scale_factor); |
55 EXPECT_EQ(0.f, last_frame.metadata.max_page_scale_factor); | 56 EXPECT_EQ(0.f, last_frame.metadata.max_page_scale_factor); |
56 return true; | 57 return true; |
57 } | 58 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 EXPECT_EQ( | 128 EXPECT_EQ( |
128 15u, last_frame.delegated_frame_data->resource_list.size()); | 129 15u, last_frame.delegated_frame_data->resource_list.size()); |
129 | 130 |
130 EndTest(); | 131 EndTest(); |
131 } | 132 } |
132 }; | 133 }; |
133 | 134 |
134 SINGLE_AND_MULTI_THREAD_TEST_F(DelegatingRendererTestResources) | 135 SINGLE_AND_MULTI_THREAD_TEST_F(DelegatingRendererTestResources) |
135 | 136 |
136 } // namespace cc | 137 } // namespace cc |
OLD | NEW |