Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: cc/scheduler/scheduler_state_machine_unittest.cc

Issue 1053153003: Remove swap ack throttling to regain performance regression on freon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittests Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/scheduler/scheduler_state_machine.h" 5 #include "cc/scheduler/scheduler_state_machine.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "cc/scheduler/scheduler.h" 8 #include "cc/scheduler/scheduler.h"
9 #include "cc/test/begin_frame_args_test.h" 9 #include "cc/test/begin_frame_args_test.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 FinishPreviousCommitAndDrawWithoutExitingDeadline(&state); 1752 FinishPreviousCommitAndDrawWithoutExitingDeadline(&state);
1753 EXPECT_ACTION_UPDATE_STATE( 1753 EXPECT_ACTION_UPDATE_STATE(
1754 SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME); 1754 SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME);
1755 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 1755 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
1756 state.DidSwapBuffersComplete(); 1756 state.DidSwapBuffersComplete();
1757 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 1757 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
1758 1758
1759 // Finish the previous commit and draw it. 1759 // Finish the previous commit and draw it.
1760 FinishPreviousCommitAndDrawWithoutExitingDeadline(&state); 1760 FinishPreviousCommitAndDrawWithoutExitingDeadline(&state);
1761 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 1761 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
1762
1763 // Verify we do not send another BeginMainFrame if was are swap throttled
1764 // and did not just swap.
1765 state.SetNeedsCommit();
1766 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
1767 state.OnBeginImplFrame();
1768 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
1769 EXPECT_FALSE(state.ShouldTriggerBeginImplFrameDeadlineImmediately());
1770 state.OnBeginImplFrameDeadline();
1771 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
1772 } 1762 }
1773 1763
1774 TEST(SchedulerStateMachineTest, 1764 TEST(SchedulerStateMachineTest,
1775 TestTriggerDeadlineImmediatelyOnLostOutputSurface) { 1765 TestTriggerDeadlineImmediatelyOnLostOutputSurface) {
1776 SchedulerSettings default_scheduler_settings; 1766 SchedulerSettings default_scheduler_settings;
1777 StateMachine state(default_scheduler_settings); 1767 StateMachine state(default_scheduler_settings);
1778 SET_UP_STATE(state) 1768 SET_UP_STATE(state)
1779 1769
1780 state.SetNeedsCommit(); 1770 state.SetNeedsCommit();
1781 1771
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 EXPECT_FALSE(state.ProactiveBeginFrameWanted()); 1918 EXPECT_FALSE(state.ProactiveBeginFrameWanted());
1929 bool commit_has_no_updates = true; 1919 bool commit_has_no_updates = true;
1930 state.UpdateStateOnCommit(commit_has_no_updates); 1920 state.UpdateStateOnCommit(commit_has_no_updates);
1931 EXPECT_TRUE(state.ProactiveBeginFrameWanted()); 1921 EXPECT_TRUE(state.ProactiveBeginFrameWanted());
1932 state.OnBeginImplFrame(); 1922 state.OnBeginImplFrame();
1933 EXPECT_FALSE(state.ProactiveBeginFrameWanted()); 1923 EXPECT_FALSE(state.ProactiveBeginFrameWanted());
1934 } 1924 }
1935 1925
1936 } // namespace 1926 } // namespace
1937 } // namespace cc 1927 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698