Chromium Code Reviews| Index: cc/output/output_surface_unittest.cc |
| diff --git a/cc/output/output_surface_unittest.cc b/cc/output/output_surface_unittest.cc |
| index 54fd3a1adc5cacf2dca5aea0ff9a3cb336ec4d7f..048ba5e4571f28669b2d4764ac6d71804006ec37 100644 |
| --- a/cc/output/output_surface_unittest.cc |
| +++ b/cc/output/output_surface_unittest.cc |
| @@ -212,6 +212,7 @@ TEST(OutputSurfaceTest, BeginFrameEmulation) { |
| // DidSwapBuffers should clear the pending BeginFrame. |
|
danakj
2013/09/12 16:53:59
comment should be replaced?
brianderson
2013/09/12 18:46:44
Yes. I will comb the code for similar comments to
|
| output_surface.DidSwapBuffersForTesting(); |
| + output_surface.SetNeedsBeginFrame(true); |
| EXPECT_EQ(client.begin_frame_count(), 1); |
| EXPECT_EQ(output_surface.pending_swap_buffers(), 1); |
| task_runner->RunPendingTasks(); |
| @@ -220,6 +221,7 @@ TEST(OutputSurfaceTest, BeginFrameEmulation) { |
| // BeginFrame should be throttled by pending swap buffers. |
|
danakj
2013/09/12 16:53:59
So if it's not tied to swap, what will throttle be
brianderson
2013/09/12 18:46:44
The OutputSurface will throttle sending the next B
|
| output_surface.DidSwapBuffersForTesting(); |
| + output_surface.SetNeedsBeginFrame(true); |
| EXPECT_EQ(client.begin_frame_count(), 2); |
| EXPECT_EQ(output_surface.pending_swap_buffers(), 2); |
| task_runner->RunPendingTasks(); |
| @@ -284,12 +286,14 @@ TEST(OutputSurfaceTest, OptimisticAndRetroactiveBeginFrames) { |
| output_surface.BeginFrameForTesting(); |
| EXPECT_EQ(client.begin_frame_count(), 2); |
| output_surface.DidSwapBuffersForTesting(); |
| + output_surface.SetNeedsBeginFrame(true); |
| EXPECT_EQ(client.begin_frame_count(), 3); |
| EXPECT_EQ(output_surface.pending_swap_buffers(), 1); |
| // Optimistically injected BeginFrames should be by throttled by pending |
| // swap buffers... |
| output_surface.DidSwapBuffersForTesting(); |
| + output_surface.SetNeedsBeginFrame(true); |
| EXPECT_EQ(client.begin_frame_count(), 3); |
| EXPECT_EQ(output_surface.pending_swap_buffers(), 2); |
| output_surface.BeginFrameForTesting(); |