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

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

Issue 2641033002: cc: Remove unused scheduler setting. (Closed)
Patch Set: Created 3 years, 11 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 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 // to release the CompositorFrameSink. 2116 // to release the CompositorFrameSink.
2117 state.NotifyBeginMainFrameStarted(); 2117 state.NotifyBeginMainFrameStarted();
2118 state.BeginMainFrameAborted( 2118 state.BeginMainFrameAborted(
2119 CommitEarlyOutReason::ABORTED_COMPOSITOR_FRAME_SINK_LOST); 2119 CommitEarlyOutReason::ABORTED_COMPOSITOR_FRAME_SINK_LOST);
2120 2120
2121 // The scheduler should begin the CompositorFrameSink creation now. 2121 // The scheduler should begin the CompositorFrameSink creation now.
2122 EXPECT_ACTION_UPDATE_STATE( 2122 EXPECT_ACTION_UPDATE_STATE(
2123 SchedulerStateMachine::ACTION_BEGIN_COMPOSITOR_FRAME_SINK_CREATION); 2123 SchedulerStateMachine::ACTION_BEGIN_COMPOSITOR_FRAME_SINK_CREATION);
2124 } 2124 }
2125 2125
2126 TEST(SchedulerStateMachineTest, CompositorFrameSinkCreationWhileCommitPending) {
2127 SchedulerSettings settings;
2128 settings.abort_commit_before_compositor_frame_sink_creation = false;
2129 StateMachine state(settings);
2130 SET_UP_STATE(state);
2131
2132 // Set up the request for a commit and start a frame.
2133 state.SetNeedsBeginMainFrame();
2134 state.OnBeginImplFrame();
2135 PerformAction(&state, SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME);
2136
2137 // Lose the CompositorFrameSink.
2138 state.DidLoseCompositorFrameSink();
2139
2140 // The scheduler shouldn't trigger the CompositorFrameSink creation till the
2141 // previous begin impl frame state is cleared from the pipeline.
2142 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
2143
2144 // Cycle through the frame stages to clear the scheduler state.
2145 state.OnBeginImplFrameDeadline();
2146 state.OnBeginImplFrameIdle();
2147
2148 // The scheduler should begin the CompositorFrameSink creation now.
2149 EXPECT_ACTION_UPDATE_STATE(
2150 SchedulerStateMachine::ACTION_BEGIN_COMPOSITOR_FRAME_SINK_CREATION);
2151 }
2152
2153 } // namespace 2126 } // namespace
2154 } // namespace cc 2127 } // 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