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 <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 RenderingStatsInstrumentation* rendering_stats_instrumentation) | 1393 RenderingStatsInstrumentation* rendering_stats_instrumentation) |
1394 : LayerTreeHostImpl(settings, | 1394 : LayerTreeHostImpl(settings, |
1395 client, | 1395 client, |
1396 proxy, | 1396 proxy, |
1397 rendering_stats_instrumentation, | 1397 rendering_stats_instrumentation, |
1398 manager, | 1398 manager, |
1399 NULL, | 1399 NULL, |
1400 0) {} | 1400 0) {} |
1401 | 1401 |
1402 BeginFrameArgs CurrentBeginFrameArgs() const override { | 1402 BeginFrameArgs CurrentBeginFrameArgs() const override { |
1403 return CreateBeginFrameArgsForTesting(fake_current_physical_time_); | 1403 return CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, |
| 1404 fake_current_physical_time_); |
1404 } | 1405 } |
1405 | 1406 |
1406 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { | 1407 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { |
1407 fake_current_physical_time_ = fake_now; | 1408 fake_current_physical_time_ = fake_now; |
1408 } | 1409 } |
1409 | 1410 |
1410 private: | 1411 private: |
1411 base::TimeTicks fake_current_physical_time_; | 1412 base::TimeTicks fake_current_physical_time_; |
1412 }; | 1413 }; |
1413 | 1414 |
(...skipping 6428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7842 // surface. | 7843 // surface. |
7843 EXPECT_EQ(0, num_lost_surfaces_); | 7844 EXPECT_EQ(0, num_lost_surfaces_); |
7844 host_impl_->DidLoseOutputSurface(); | 7845 host_impl_->DidLoseOutputSurface(); |
7845 EXPECT_EQ(1, num_lost_surfaces_); | 7846 EXPECT_EQ(1, num_lost_surfaces_); |
7846 host_impl_->DidLoseOutputSurface(); | 7847 host_impl_->DidLoseOutputSurface(); |
7847 EXPECT_LE(1, num_lost_surfaces_); | 7848 EXPECT_LE(1, num_lost_surfaces_); |
7848 } | 7849 } |
7849 | 7850 |
7850 } // namespace | 7851 } // namespace |
7851 } // namespace cc | 7852 } // namespace cc |
OLD | NEW |