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

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

Issue 23495022: CC: Add a scheduled action for ManageTiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add to AsValue Created 7 years, 3 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
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.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 state_machine_.SetNeedsCommit(); 58 state_machine_.SetNeedsCommit();
59 state_machine_.SetNeedsForcedCommitForReadback(); 59 state_machine_.SetNeedsForcedCommitForReadback();
60 ProcessScheduledActions(); 60 ProcessScheduledActions();
61 } 61 }
62 62
63 void Scheduler::SetNeedsRedraw() { 63 void Scheduler::SetNeedsRedraw() {
64 state_machine_.SetNeedsRedraw(); 64 state_machine_.SetNeedsRedraw();
65 ProcessScheduledActions(); 65 ProcessScheduledActions();
66 } 66 }
67 67
68 void Scheduler::SetNeedsManageTiles() {
69 state_machine_.SetNeedsManageTiles();
70 ProcessScheduledActions();
71 }
72
68 void Scheduler::SetSwapUsedIncompleteTile(bool used_incomplete_tile) { 73 void Scheduler::SetSwapUsedIncompleteTile(bool used_incomplete_tile) {
69 state_machine_.SetSwapUsedIncompleteTile(used_incomplete_tile); 74 state_machine_.SetSwapUsedIncompleteTile(used_incomplete_tile);
70 ProcessScheduledActions(); 75 ProcessScheduledActions();
71 } 76 }
72 77
73 void Scheduler::SetMainThreadNeedsLayerTextures() { 78 void Scheduler::SetMainThreadNeedsLayerTextures() {
74 state_machine_.SetMainThreadNeedsLayerTextures(); 79 state_machine_.SetMainThreadNeedsLayerTextures();
75 ProcessScheduledActions(); 80 ProcessScheduledActions();
76 } 81 }
77 82
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 break; 240 break;
236 case SchedulerStateMachine::ACTION_DRAW_AND_READBACK: 241 case SchedulerStateMachine::ACTION_DRAW_AND_READBACK:
237 DrawAndReadback(); 242 DrawAndReadback();
238 break; 243 break;
239 case SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_CREATION: 244 case SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_CREATION:
240 client_->ScheduledActionBeginOutputSurfaceCreation(); 245 client_->ScheduledActionBeginOutputSurfaceCreation();
241 break; 246 break;
242 case SchedulerStateMachine::ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD: 247 case SchedulerStateMachine::ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD:
243 client_->ScheduledActionAcquireLayerTexturesForMainThread(); 248 client_->ScheduledActionAcquireLayerTexturesForMainThread();
244 break; 249 break;
250 case SchedulerStateMachine::ACTION_MANAGE_TILES:
251 client_->ScheduledActionManageTiles();
252 break;
245 } 253 }
246 } while (action != SchedulerStateMachine::ACTION_NONE); 254 } while (action != SchedulerStateMachine::ACTION_NONE);
247 255
248 SetupNextBeginFrameIfNeeded(); 256 SetupNextBeginFrameIfNeeded();
249 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); 257 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime());
250 } 258 }
251 259
252 bool Scheduler::WillDrawIfNeeded() const { 260 bool Scheduler::WillDrawIfNeeded() const {
253 return !state_machine_.PendingDrawsShouldBeAborted(); 261 return !state_machine_.PendingDrawsShouldBeAborted();
254 } 262 }
255 263
256 } // namespace cc 264 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698