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

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

Issue 15730005: cc: Don't make AcquireLayerTextures force a commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + fix test Created 7 years, 5 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 | Annotate | Revision Log
« 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 "cc/scheduler/scheduler.h" 7 #include "cc/scheduler/scheduler.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 state.SetVisible(true); 1268 state.SetVisible(true);
1269 EXPECT_FALSE(state.DrawSuspendedUntilCommit()); 1269 EXPECT_FALSE(state.DrawSuspendedUntilCommit());
1270 1270
1271 state.SetMainThreadNeedsLayerTextures(); 1271 state.SetMainThreadNeedsLayerTextures();
1272 EXPECT_EQ( 1272 EXPECT_EQ(
1273 SchedulerStateMachine::ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD, 1273 SchedulerStateMachine::ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD,
1274 state.NextAction()); 1274 state.NextAction());
1275 state.UpdateState(state.NextAction()); 1275 state.UpdateState(state.NextAction());
1276 EXPECT_TRUE(state.DrawSuspendedUntilCommit()); 1276 EXPECT_TRUE(state.DrawSuspendedUntilCommit());
1277 1277
1278 EXPECT_EQ(SchedulerStateMachine::ACTION_NONE, state.NextAction());
1279
1280 state.SetNeedsCommit();
1278 EXPECT_EQ(SchedulerStateMachine::ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD, 1281 EXPECT_EQ(SchedulerStateMachine::ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD,
1279 state.NextAction()); 1282 state.NextAction());
1280 1283
1281 state.UpdateState(state.NextAction()); 1284 state.UpdateState(state.NextAction());
1282 EXPECT_TRUE(state.DrawSuspendedUntilCommit()); 1285 EXPECT_TRUE(state.DrawSuspendedUntilCommit());
1283 1286
1284 EXPECT_EQ(SchedulerStateMachine::ACTION_NONE, state.NextAction()); 1287 EXPECT_EQ(SchedulerStateMachine::ACTION_NONE, state.NextAction());
1285 1288
1286 state.FinishCommit(); 1289 state.FinishCommit();
1287 EXPECT_TRUE(state.DrawSuspendedUntilCommit()); 1290 EXPECT_TRUE(state.DrawSuspendedUntilCommit());
1288 1291
1289 EXPECT_EQ(SchedulerStateMachine::ACTION_COMMIT, state.NextAction()); 1292 EXPECT_EQ(SchedulerStateMachine::ACTION_COMMIT, state.NextAction());
1290 1293
1291 state.UpdateState(state.NextAction()); 1294 state.UpdateState(state.NextAction());
1292 EXPECT_FALSE(state.DrawSuspendedUntilCommit()); 1295 EXPECT_FALSE(state.DrawSuspendedUntilCommit());
1293 } 1296 }
1294 1297
1295 } // namespace 1298 } // namespace
1296 } // namespace cc 1299 } // 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