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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 Proxy* proxy, | 1324 Proxy* proxy, |
1324 SharedBitmapManager* manager, | 1325 SharedBitmapManager* manager, |
1325 RenderingStatsInstrumentation* rendering_stats_instrumentation) | 1326 RenderingStatsInstrumentation* rendering_stats_instrumentation) |
1326 : LayerTreeHostImpl(settings, | 1327 : LayerTreeHostImpl(settings, |
1327 client, | 1328 client, |
1328 proxy, | 1329 proxy, |
1329 rendering_stats_instrumentation, | 1330 rendering_stats_instrumentation, |
1330 manager, | 1331 manager, |
1331 0) {} | 1332 0) {} |
1332 | 1333 |
1333 virtual base::TimeTicks CurrentFrameTimeTicks() OVERRIDE { | 1334 virtual BeginFrameArgs CurrentBeginFrameArgs() const OVERRIDE { |
1334 return fake_current_physical_time_; | 1335 return CreateBeginFrameArgsForTesting(fake_current_physical_time_); |
1335 } | 1336 } |
1336 | 1337 |
1337 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { | 1338 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { |
1338 fake_current_physical_time_ = fake_now; | 1339 fake_current_physical_time_ = fake_now; |
1339 } | 1340 } |
1340 | 1341 |
1341 private: | 1342 private: |
1342 base::TimeTicks fake_current_physical_time_; | 1343 base::TimeTicks fake_current_physical_time_; |
1343 }; | 1344 }; |
1344 | 1345 |
(...skipping 5679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7024 host_impl_->DidLoseOutputSurface(); | 7025 host_impl_->DidLoseOutputSurface(); |
7025 EXPECT_TRUE(host_impl_->IsContextLost()); | 7026 EXPECT_TRUE(host_impl_->IsContextLost()); |
7026 EXPECT_EQ(1, num_lost_surfaces_); | 7027 EXPECT_EQ(1, num_lost_surfaces_); |
7027 host_impl_->DidLoseOutputSurface(); | 7028 host_impl_->DidLoseOutputSurface(); |
7028 EXPECT_TRUE(host_impl_->IsContextLost()); | 7029 EXPECT_TRUE(host_impl_->IsContextLost()); |
7029 EXPECT_EQ(1, num_lost_surfaces_); | 7030 EXPECT_EQ(1, num_lost_surfaces_); |
7030 } | 7031 } |
7031 | 7032 |
7032 } // namespace | 7033 } // namespace |
7033 } // namespace cc | 7034 } // namespace cc |
OLD | NEW |