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

Side by Side Diff: cc/thread_proxy.cc

Issue 12540003: CrOS: Set max frames pending for UI from command line. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/context_provider.h" 10 #include "cc/context_provider.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 { 1033 {
1034 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread"); 1034 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread");
1035 DCHECK(isImplThread()); 1035 DCHECK(isImplThread());
1036 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get()); 1036 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get());
1037 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa ceBeforeInitializationOnImplThread.Pass()); 1037 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa ceBeforeInitializationOnImplThread.Pass());
1038 if (*initializeSucceeded) { 1038 if (*initializeSucceeded) {
1039 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); 1039 *capabilities = m_layerTreeHostImpl->rendererCapabilities();
1040 m_schedulerOnImplThread->setSwapBuffersCompleteSupported( 1040 m_schedulerOnImplThread->setSwapBuffersCompleteSupported(
1041 capabilities->usingSwapCompleteCallback); 1041 capabilities->usingSwapCompleteCallback);
1042 1042
1043 int maxFramesPending = FrameRateController::kDefaultMaxFramesPending; 1043 int maxFramesPending = m_layerTreeHostImpl->outputSurface()->capabilitie s().max_frames_pending;
1044 if (m_layerTreeHostImpl->outputSurface()->capabilities().has_parent_comp ositor) 1044 if (maxFramesPending <= 0)
1045 maxFramesPending = 1; 1045 maxFramesPending = FrameRateController::kDefaultMaxFramesPending;
1046
1046 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending); 1047 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending);
1047 } 1048 }
1048 1049
1049 completion->signal(); 1050 completion->signal();
1050 } 1051 }
1051 1052
1052 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) 1053 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion)
1053 { 1054 {
1054 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread"); 1055 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread");
1055 DCHECK(isImplThread()); 1056 DCHECK(isImplThread());
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 1230
1230 void ThreadProxy::renewTreePriorityOnImplThread() 1231 void ThreadProxy::renewTreePriorityOnImplThread()
1231 { 1232 {
1232 DCHECK(m_renewTreePriorityOnImplThreadPending); 1233 DCHECK(m_renewTreePriorityOnImplThreadPending);
1233 m_renewTreePriorityOnImplThreadPending = false; 1234 m_renewTreePriorityOnImplThreadPending = false;
1234 1235
1235 renewTreePriority(); 1236 renewTreePriority();
1236 } 1237 }
1237 1238
1238 } // namespace cc 1239 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698