| Index: cc/surfaces/display_scheduler_unittest.cc
|
| diff --git a/cc/surfaces/display_scheduler_unittest.cc b/cc/surfaces/display_scheduler_unittest.cc
|
| index ea7a22fba5a84d9bf54d197f19a0911a4101c81e..1a5cbe4086b9d4581bf2a44ce75a03d88ef9ebe4 100644
|
| --- a/cc/surfaces/display_scheduler_unittest.cc
|
| +++ b/cc/surfaces/display_scheduler_unittest.cc
|
| @@ -106,12 +106,9 @@
|
| };
|
|
|
| TEST_F(DisplaySchedulerTest, ResizeHasLateDeadlineUntilNewRootSurface) {
|
| - SurfaceId root_surface_id1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| - SurfaceId root_surface_id2(kArbitraryFrameSinkId,
|
| - LocalFrameId(2, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(3, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
| + SurfaceId root_surface_id2(kArbitraryFrameSinkId, LocalFrameId(2, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(3, 0));
|
| base::TimeTicks late_deadline;
|
|
|
| scheduler_.SetVisible(true);
|
| @@ -146,10 +143,8 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, ResizeHasLateDeadlineUntilDamagedSurface) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(2, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(2, 0));
|
| base::TimeTicks late_deadline;
|
|
|
| scheduler_.SetVisible(true);
|
| @@ -184,12 +179,9 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, SurfaceDamaged) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| - SurfaceId sid2(kArbitraryFrameSinkId,
|
| - LocalFrameId(2, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
| + SurfaceId sid2(kArbitraryFrameSinkId, LocalFrameId(2, 0));
|
|
|
| scheduler_.SetVisible(true);
|
|
|
| @@ -253,10 +245,8 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, OutputSurfaceLost) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
|
|
| scheduler_.SetVisible(true);
|
|
|
| @@ -288,10 +278,8 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, VisibleWithoutDamageNoTicks) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
|
|
| EXPECT_EQ(0u, fake_begin_frame_source_.num_observers());
|
| scheduler_.SetVisible(true);
|
| @@ -305,10 +293,8 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, VisibleWithDamageTicks) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
|
|
| scheduler_.SetNewRootSurface(root_surface_id);
|
|
|
| @@ -321,10 +307,8 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, Visibility) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
|
|
| scheduler_.SetNewRootSurface(root_surface_id);
|
| scheduler_.SetVisible(true);
|
| @@ -372,10 +356,8 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, ResizeCausesSwap) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
|
|
| scheduler_.SetVisible(true);
|
|
|
| @@ -399,10 +381,8 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, RootSurfaceResourcesLocked) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
| base::TimeTicks late_deadline;
|
|
|
| scheduler_.SetVisible(true);
|
| @@ -449,12 +429,9 @@
|
| }
|
|
|
| TEST_F(DisplaySchedulerTest, DidSwapBuffers) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(0, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| - SurfaceId sid2(kArbitraryFrameSinkId,
|
| - LocalFrameId(2, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(0, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
| + SurfaceId sid2(kArbitraryFrameSinkId, LocalFrameId(2, 0));
|
|
|
| scheduler_.SetVisible(true);
|
|
|
| @@ -519,10 +496,8 @@
|
| // This test verfies that we try to reschedule the deadline
|
| // after any event that may change what deadline we want.
|
| TEST_F(DisplaySchedulerTest, ScheduleBeginFrameDeadline) {
|
| - SurfaceId root_surface_id(kArbitraryFrameSinkId,
|
| - LocalFrameId(1, base::UnguessableToken::Create()));
|
| - SurfaceId sid1(kArbitraryFrameSinkId,
|
| - LocalFrameId(2, base::UnguessableToken::Create()));
|
| + SurfaceId root_surface_id(kArbitraryFrameSinkId, LocalFrameId(1, 0));
|
| + SurfaceId sid1(kArbitraryFrameSinkId, LocalFrameId(2, 0));
|
| int count = 1;
|
| EXPECT_EQ(count, scheduler_.scheduler_begin_frame_deadline_count());
|
|
|
|
|