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

Side by Side Diff: cc/scheduler.cc

Issue 11747002: cc: Set the max frames pending from the thread proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK_GE Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/scheduler.h ('k') | cc/test/fake_output_surface.h » ('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.h" 5 #include "cc/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 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 TRACE_EVENT0("cc", "Scheduler::beginFrameAborted"); 92 TRACE_EVENT0("cc", "Scheduler::beginFrameAborted");
93 m_stateMachine.beginFrameAborted(); 93 m_stateMachine.beginFrameAborted();
94 processScheduledActions(); 94 processScheduledActions();
95 } 95 }
96 96
97 void Scheduler::setMaxFramesPending(int maxFramesPending) 97 void Scheduler::setMaxFramesPending(int maxFramesPending)
98 { 98 {
99 m_frameRateController->setMaxFramesPending(maxFramesPending); 99 m_frameRateController->setMaxFramesPending(maxFramesPending);
100 } 100 }
101 101
102 int Scheduler::maxFramesPending() const
103 {
104 return m_frameRateController->maxFramesPending();
105 }
106
102 void Scheduler::setSwapBuffersCompleteSupported(bool supported) 107 void Scheduler::setSwapBuffersCompleteSupported(bool supported)
103 { 108 {
104 m_frameRateController->setSwapBuffersCompleteSupported(supported); 109 m_frameRateController->setSwapBuffersCompleteSupported(supported);
105 } 110 }
106 111
107 void Scheduler::didSwapBuffersComplete() 112 void Scheduler::didSwapBuffersComplete()
108 { 113 {
109 TRACE_EVENT0("cc", "Scheduler::didSwapBuffersComplete"); 114 TRACE_EVENT0("cc", "Scheduler::didSwapBuffersComplete");
110 m_frameRateController->didFinishFrame(); 115 m_frameRateController->didFinishFrame();
111 } 116 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 197 }
193 action = m_stateMachine.nextAction(); 198 action = m_stateMachine.nextAction();
194 } 199 }
195 200
196 // Activate or deactivate the frame rate controller. 201 // Activate or deactivate the frame rate controller.
197 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); 202 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded());
198 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() ); 203 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() );
199 } 204 }
200 205
201 } // namespace cc 206 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler.h ('k') | cc/test/fake_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698