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

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

Issue 1841083007: Remove SendBeginFramesToChildren plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_output_surface_client_set_beginframesource
Patch Set: Rebase Created 4 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/scheduler/scheduler.h" 10 #include "cc/scheduler/scheduler.h"
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME); 2053 SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME);
2054 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 2054 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
2055 EXPECT_FALSE(state.ShouldTriggerBeginImplFrameDeadlineImmediately()); 2055 EXPECT_FALSE(state.ShouldTriggerBeginImplFrameDeadlineImmediately());
2056 2056
2057 state.SetBeginFrameSourcePaused(true); 2057 state.SetBeginFrameSourcePaused(true);
2058 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 2058 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
2059 EXPECT_TRUE(state.PendingActivationsShouldBeForced()); 2059 EXPECT_TRUE(state.PendingActivationsShouldBeForced());
2060 EXPECT_TRUE(state.ShouldTriggerBeginImplFrameDeadlineImmediately()); 2060 EXPECT_TRUE(state.ShouldTriggerBeginImplFrameDeadlineImmediately());
2061 } 2061 }
2062 2062
2063 TEST(SchedulerStateMachineTest, TestForwardBeginFramesToChildren) {
2064 SchedulerSettings settings;
2065 StateMachine state(settings);
2066 SET_UP_STATE(state)
2067
2068 EXPECT_FALSE(state.BeginFrameNeeded());
2069 state.SetChildrenNeedBeginFrames(true);
2070 EXPECT_TRUE(state.BeginFrameNeeded());
2071 }
2072
2073 TEST(SchedulerStateMachineTest, TestDeferCommit) { 2063 TEST(SchedulerStateMachineTest, TestDeferCommit) {
2074 SchedulerSettings settings; 2064 SchedulerSettings settings;
2075 StateMachine state(settings); 2065 StateMachine state(settings);
2076 SET_UP_STATE(state) 2066 SET_UP_STATE(state)
2077 2067
2078 state.SetDeferCommits(true); 2068 state.SetDeferCommits(true);
2079 2069
2080 state.SetNeedsBeginMainFrame(); 2070 state.SetNeedsBeginMainFrame();
2081 EXPECT_FALSE(state.BeginFrameNeeded()); 2071 EXPECT_FALSE(state.BeginFrameNeeded());
2082 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 2072 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2165 state.OnBeginImplFrameDeadline(); 2155 state.OnBeginImplFrameDeadline();
2166 state.OnBeginImplFrameIdle(); 2156 state.OnBeginImplFrameIdle();
2167 2157
2168 // The scheduler should begin the output surface creation now. 2158 // The scheduler should begin the output surface creation now.
2169 EXPECT_ACTION_UPDATE_STATE( 2159 EXPECT_ACTION_UPDATE_STATE(
2170 SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_CREATION); 2160 SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_CREATION);
2171 } 2161 }
2172 2162
2173 } // namespace 2163 } // namespace
2174 } // namespace cc 2164 } // 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