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

Side by Side Diff: cc/thread_proxy.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/thread_proxy.h ('k') | no next file » | 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/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/delay_based_time_source.h" 9 #include "cc/delay_based_time_source.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 void ThreadProxy::initializeRendererOnImplThread(CompletionEvent* completion, bo ol* initializeSucceeded, RendererCapabilities* capabilities) 939 void ThreadProxy::initializeRendererOnImplThread(CompletionEvent* completion, bo ol* initializeSucceeded, RendererCapabilities* capabilities)
940 { 940 {
941 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread"); 941 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread");
942 DCHECK(isImplThread()); 942 DCHECK(isImplThread());
943 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get()); 943 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get());
944 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa ceBeforeInitializationOnImplThread.Pass()); 944 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa ceBeforeInitializationOnImplThread.Pass());
945 if (*initializeSucceeded) { 945 if (*initializeSucceeded) {
946 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); 946 *capabilities = m_layerTreeHostImpl->rendererCapabilities();
947 m_schedulerOnImplThread->setSwapBuffersCompleteSupported( 947 m_schedulerOnImplThread->setSwapBuffersCompleteSupported(
948 capabilities->usingSwapCompleteCallback); 948 capabilities->usingSwapCompleteCallback);
949
950 int maxFramesPending = FrameRateController::kDefaultMaxFramesPending;
951 if (m_layerTreeHostImpl->outputSurface()->Capabilities().has_parent_comp ositor)
952 maxFramesPending = 1;
953 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending);
949 } 954 }
950 955
951 completion->signal(); 956 completion->signal();
952 } 957 }
953 958
954 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) 959 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion)
955 { 960 {
956 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread"); 961 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread");
957 DCHECK(isImplThread()); 962 DCHECK(isImplThread());
958 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->res ourceProvider()); 963 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->res ourceProvider());
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 } 1047 }
1043 1048
1044 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia:: RefPtr<SkPicture>* picture) 1049 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia:: RefPtr<SkPicture>* picture)
1045 { 1050 {
1046 DCHECK(isImplThread()); 1051 DCHECK(isImplThread());
1047 *picture = m_layerTreeHostImpl->capturePicture(); 1052 *picture = m_layerTreeHostImpl->capturePicture();
1048 completion->signal(); 1053 completion->signal();
1049 } 1054 }
1050 1055
1051 } // namespace cc 1056 } // namespace cc
OLDNEW
« no previous file with comments | « cc/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698