OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "cc/output/compositor_frame_metadata.h" | 31 #include "cc/output/compositor_frame_metadata.h" |
32 #include "cc/output/copy_output_request.h" | 32 #include "cc/output/copy_output_request.h" |
33 #include "cc/output/copy_output_result.h" | 33 #include "cc/output/copy_output_result.h" |
34 #include "cc/output/gl_renderer.h" | 34 #include "cc/output/gl_renderer.h" |
35 #include "cc/quads/render_pass_draw_quad.h" | 35 #include "cc/quads/render_pass_draw_quad.h" |
36 #include "cc/quads/solid_color_draw_quad.h" | 36 #include "cc/quads/solid_color_draw_quad.h" |
37 #include "cc/quads/texture_draw_quad.h" | 37 #include "cc/quads/texture_draw_quad.h" |
38 #include "cc/quads/tile_draw_quad.h" | 38 #include "cc/quads/tile_draw_quad.h" |
39 #include "cc/resources/layer_tiling_data.h" | 39 #include "cc/resources/layer_tiling_data.h" |
40 #include "cc/test/animation_test_common.h" | 40 #include "cc/test/animation_test_common.h" |
| 41 #include "cc/test/begin_frame_args_test.h" |
41 #include "cc/test/fake_layer_tree_host_impl.h" | 42 #include "cc/test/fake_layer_tree_host_impl.h" |
42 #include "cc/test/fake_output_surface.h" | 43 #include "cc/test/fake_output_surface.h" |
43 #include "cc/test/fake_output_surface_client.h" | 44 #include "cc/test/fake_output_surface_client.h" |
44 #include "cc/test/fake_picture_layer_impl.h" | 45 #include "cc/test/fake_picture_layer_impl.h" |
45 #include "cc/test/fake_picture_pile_impl.h" | 46 #include "cc/test/fake_picture_pile_impl.h" |
46 #include "cc/test/fake_proxy.h" | 47 #include "cc/test/fake_proxy.h" |
47 #include "cc/test/fake_rendering_stats_instrumentation.h" | 48 #include "cc/test/fake_rendering_stats_instrumentation.h" |
48 #include "cc/test/fake_video_frame_provider.h" | 49 #include "cc/test/fake_video_frame_provider.h" |
49 #include "cc/test/geometry_test_utils.h" | 50 #include "cc/test/geometry_test_utils.h" |
50 #include "cc/test/layer_test_common.h" | 51 #include "cc/test/layer_test_common.h" |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 Proxy* proxy, | 1306 Proxy* proxy, |
1306 SharedBitmapManager* manager, | 1307 SharedBitmapManager* manager, |
1307 RenderingStatsInstrumentation* rendering_stats_instrumentation) | 1308 RenderingStatsInstrumentation* rendering_stats_instrumentation) |
1308 : LayerTreeHostImpl(settings, | 1309 : LayerTreeHostImpl(settings, |
1309 client, | 1310 client, |
1310 proxy, | 1311 proxy, |
1311 rendering_stats_instrumentation, | 1312 rendering_stats_instrumentation, |
1312 manager, | 1313 manager, |
1313 0) {} | 1314 0) {} |
1314 | 1315 |
1315 virtual base::TimeTicks CurrentFrameTimeTicks() OVERRIDE { | 1316 virtual BeginFrameArgs CurrentBeginFrameArgs() const OVERRIDE { |
1316 return fake_current_physical_time_; | 1317 return CreateBeginFrameArgsForTesting(fake_current_physical_time_); |
1317 } | 1318 } |
1318 | 1319 |
1319 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { | 1320 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { |
1320 fake_current_physical_time_ = fake_now; | 1321 fake_current_physical_time_ = fake_now; |
1321 } | 1322 } |
1322 | 1323 |
1323 private: | 1324 private: |
1324 base::TimeTicks fake_current_physical_time_; | 1325 base::TimeTicks fake_current_physical_time_; |
1325 }; | 1326 }; |
1326 | 1327 |
(...skipping 5509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6836 host_impl_->DidLoseOutputSurface(); | 6837 host_impl_->DidLoseOutputSurface(); |
6837 EXPECT_TRUE(host_impl_->IsContextLost()); | 6838 EXPECT_TRUE(host_impl_->IsContextLost()); |
6838 EXPECT_EQ(1, num_lost_surfaces_); | 6839 EXPECT_EQ(1, num_lost_surfaces_); |
6839 host_impl_->DidLoseOutputSurface(); | 6840 host_impl_->DidLoseOutputSurface(); |
6840 EXPECT_TRUE(host_impl_->IsContextLost()); | 6841 EXPECT_TRUE(host_impl_->IsContextLost()); |
6841 EXPECT_EQ(1, num_lost_surfaces_); | 6842 EXPECT_EQ(1, num_lost_surfaces_); |
6842 } | 6843 } |
6843 | 6844 |
6844 } // namespace | 6845 } // namespace |
6845 } // namespace cc | 6846 } // namespace cc |
OLD | NEW |