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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 RenderingStatsInstrumentation* rendering_stats_instrumentation) | 1382 RenderingStatsInstrumentation* rendering_stats_instrumentation) |
1383 : LayerTreeHostImpl(settings, | 1383 : LayerTreeHostImpl(settings, |
1384 client, | 1384 client, |
1385 proxy, | 1385 proxy, |
1386 rendering_stats_instrumentation, | 1386 rendering_stats_instrumentation, |
1387 manager, | 1387 manager, |
1388 NULL, | 1388 NULL, |
1389 0) {} | 1389 0) {} |
1390 | 1390 |
1391 BeginFrameArgs CurrentBeginFrameArgs() const override { | 1391 BeginFrameArgs CurrentBeginFrameArgs() const override { |
1392 return CreateBeginFrameArgsForTesting(fake_current_physical_time_); | 1392 return CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, |
| 1393 fake_current_physical_time_); |
1393 } | 1394 } |
1394 | 1395 |
1395 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { | 1396 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { |
1396 fake_current_physical_time_ = fake_now; | 1397 fake_current_physical_time_ = fake_now; |
1397 } | 1398 } |
1398 | 1399 |
1399 private: | 1400 private: |
1400 base::TimeTicks fake_current_physical_time_; | 1401 base::TimeTicks fake_current_physical_time_; |
1401 }; | 1402 }; |
1402 | 1403 |
(...skipping 6416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7819 // surface. | 7820 // surface. |
7820 EXPECT_EQ(0, num_lost_surfaces_); | 7821 EXPECT_EQ(0, num_lost_surfaces_); |
7821 host_impl_->DidLoseOutputSurface(); | 7822 host_impl_->DidLoseOutputSurface(); |
7822 EXPECT_EQ(1, num_lost_surfaces_); | 7823 EXPECT_EQ(1, num_lost_surfaces_); |
7823 host_impl_->DidLoseOutputSurface(); | 7824 host_impl_->DidLoseOutputSurface(); |
7824 EXPECT_LE(1, num_lost_surfaces_); | 7825 EXPECT_LE(1, num_lost_surfaces_); |
7825 } | 7826 } |
7826 | 7827 |
7827 } // namespace | 7828 } // namespace |
7828 } // namespace cc | 7829 } // namespace cc |
OLD | NEW |