OLD | NEW |
---|---|
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 Loading... | |
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->using_swap_complete_callback); | 1041 capabilities->using_swap_complete_callback); |
1042 | 1042 |
1043 int maxFramesPending = FrameRateController::kDefaultMaxFramesPending; | 1043 int maxFramesPending = m_layerTreeHostImpl->outputSurface()->capabilitie s().max_frames_pending; |
DaveMoore
2013/03/13 17:49:06
Nit: Line length
jonathan.backer
2013/03/13 18:00:25
cc is a mix of WK and Cr style (currently being sc
| |
1044 if (maxFramesPending <= 0) | |
1045 maxFramesPending = FrameRateController::kDefaultMaxFramesPending; | |
1044 if (m_layerTreeHostImpl->outputSurface()->capabilities().has_parent_comp ositor) | 1046 if (m_layerTreeHostImpl->outputSurface()->capabilities().has_parent_comp ositor) |
1045 maxFramesPending = 1; | 1047 maxFramesPending = 1; |
1046 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending); | 1048 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending); |
1047 } | 1049 } |
1048 | 1050 |
1049 completion->signal(); | 1051 completion->signal(); |
1050 } | 1052 } |
1051 | 1053 |
1052 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) | 1054 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) |
1053 { | 1055 { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1229 | 1231 |
1230 void ThreadProxy::renewTreePriorityOnImplThread() | 1232 void ThreadProxy::renewTreePriorityOnImplThread() |
1231 { | 1233 { |
1232 DCHECK(m_renewTreePriorityOnImplThreadPending); | 1234 DCHECK(m_renewTreePriorityOnImplThreadPending); |
1233 m_renewTreePriorityOnImplThreadPending = false; | 1235 m_renewTreePriorityOnImplThreadPending = false; |
1234 | 1236 |
1235 renewTreePriority(); | 1237 renewTreePriority(); |
1236 } | 1238 } |
1237 | 1239 |
1238 } // namespace cc | 1240 } // namespace cc |
OLD | NEW |