| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "base/containers/flat_set.h" | 5 #include "base/containers/flat_set.h" |
| 6 #include "cc/surfaces/compositor_frame_sink_support.h" | 6 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 7 #include "cc/surfaces/surface_id.h" | 7 #include "cc/surfaces/surface_id.h" |
| 8 #include "cc/surfaces/surface_manager.h" | 8 #include "cc/surfaces/surface_manager.h" |
| 9 #include "cc/surfaces/surface_observer.h" | 9 #include "cc/surfaces/surface_observer.h" |
| 10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 const SurfaceId display_id = MakeSurfaceId(kDisplayFrameSink, 1); | 979 const SurfaceId display_id = MakeSurfaceId(kDisplayFrameSink, 1); |
| 980 | 980 |
| 981 // Request BeginFrames. | 981 // Request BeginFrames. |
| 982 display_support().SetNeedsBeginFrame(true); | 982 display_support().SetNeedsBeginFrame(true); |
| 983 | 983 |
| 984 // Issue a BeginFrame. | 984 // Issue a BeginFrame. |
| 985 BeginFrameArgs args = | 985 BeginFrameArgs args = |
| 986 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1); | 986 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1); |
| 987 begin_frame_source()->TestOnBeginFrame(args); | 987 begin_frame_source()->TestOnBeginFrame(args); |
| 988 | 988 |
| 989 // Check that the support forwards a BeginFrameDidNotSwap ack to the | 989 // Check that the support forwards a BeginFrameDidNotProduceFrame ack to the |
| 990 // BeginFrameSource. | 990 // BeginFrameSource. |
| 991 BeginFrameAck ack(0, 1, 1, false); | 991 BeginFrameAck ack(0, 1, 1, false); |
| 992 display_support().BeginFrameDidNotSwap(ack); | 992 display_support().BeginFrameDidNotProduceFrame(ack); |
| 993 EXPECT_EQ(ack, begin_frame_source()->LastAckForObserver(&display_support())); | 993 EXPECT_EQ(ack, begin_frame_source()->LastAckForObserver(&display_support())); |
| 994 | 994 |
| 995 // Issue another BeginFrame. | 995 // Issue another BeginFrame. |
| 996 args = CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 2); | 996 args = CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 2); |
| 997 begin_frame_source()->TestOnBeginFrame(args); | 997 begin_frame_source()->TestOnBeginFrame(args); |
| 998 | 998 |
| 999 // Check that the support forwards the BeginFrameAck attached | 999 // Check that the support forwards the BeginFrameAck attached |
| 1000 // to a CompositorFrame to the BeginFrameSource. | 1000 // to a CompositorFrame to the BeginFrameSource. |
| 1001 BeginFrameAck ack2(0, 2, 2, true); | 1001 BeginFrameAck ack2(0, 2, 2, true); |
| 1002 CompositorFrame frame = MakeCompositorFrame(); | 1002 CompositorFrame frame = MakeCompositorFrame(); |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 DidReceiveCompositorFrameAck(Eq(returned_resources2))); | 1381 DidReceiveCompositorFrameAck(Eq(returned_resources2))); |
| 1382 child_support1().SubmitCompositorFrame( | 1382 child_support1().SubmitCompositorFrame( |
| 1383 child_id1.local_surface_id(), | 1383 child_id1.local_surface_id(), |
| 1384 MakeCompositorFrame(empty_surface_ids(), empty_surface_ids(), | 1384 MakeCompositorFrame(empty_surface_ids(), empty_surface_ids(), |
| 1385 {resource2})); | 1385 {resource2})); |
| 1386 testing::Mock::VerifyAndClearExpectations(&support_client_); | 1386 testing::Mock::VerifyAndClearExpectations(&support_client_); |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 } // namespace test | 1389 } // namespace test |
| 1390 } // namespace cc | 1390 } // namespace cc |
| OLD | NEW |