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/delay_based_time_source.h" | 10 #include "cc/delay_based_time_source.h" |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread"); | 1021 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread"); |
1022 DCHECK(isImplThread()); | 1022 DCHECK(isImplThread()); |
1023 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get()); | 1023 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get()); |
1024 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa
ceBeforeInitializationOnImplThread.Pass()); | 1024 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa
ceBeforeInitializationOnImplThread.Pass()); |
1025 if (*initializeSucceeded) { | 1025 if (*initializeSucceeded) { |
1026 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); | 1026 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); |
1027 m_schedulerOnImplThread->setSwapBuffersCompleteSupported( | 1027 m_schedulerOnImplThread->setSwapBuffersCompleteSupported( |
1028 capabilities->usingSwapCompleteCallback); | 1028 capabilities->usingSwapCompleteCallback); |
1029 | 1029 |
1030 int maxFramesPending = FrameRateController::kDefaultMaxFramesPending; | 1030 int maxFramesPending = FrameRateController::kDefaultMaxFramesPending; |
1031 if (m_layerTreeHostImpl->outputSurface()->Capabilities().has_parent_comp
ositor) | 1031 if (m_layerTreeHostImpl->outputSurface()->capabilities().has_parent_comp
ositor) |
1032 maxFramesPending = 1; | 1032 maxFramesPending = 1; |
1033 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending); | 1033 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending); |
1034 } | 1034 } |
1035 | 1035 |
1036 completion->signal(); | 1036 completion->signal(); |
1037 } | 1037 } |
1038 | 1038 |
1039 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) | 1039 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) |
1040 { | 1040 { |
1041 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread"); | 1041 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread"); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 | 1211 |
1212 void ThreadProxy::renewTreePriorityOnImplThread() | 1212 void ThreadProxy::renewTreePriorityOnImplThread() |
1213 { | 1213 { |
1214 DCHECK(m_renewTreePriorityOnImplThreadPending); | 1214 DCHECK(m_renewTreePriorityOnImplThreadPending); |
1215 m_renewTreePriorityOnImplThreadPending = false; | 1215 m_renewTreePriorityOnImplThreadPending = false; |
1216 | 1216 |
1217 renewTreePriority(); | 1217 renewTreePriority(); |
1218 } | 1218 } |
1219 | 1219 |
1220 } // namespace cc | 1220 } // namespace cc |
OLD | NEW |