| 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/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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread"); | 935 TRACE_EVENT0("cc", "ThreadProxy::initializeRendererOnImplThread"); |
| 936 DCHECK(isImplThread()); | 936 DCHECK(isImplThread()); |
| 937 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get()); | 937 DCHECK(m_outputSurfaceBeforeInitializationOnImplThread.get()); |
| 938 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa
ceBeforeInitializationOnImplThread.Pass()); | 938 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_outputSurfa
ceBeforeInitializationOnImplThread.Pass()); |
| 939 if (*initializeSucceeded) { | 939 if (*initializeSucceeded) { |
| 940 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); | 940 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); |
| 941 m_schedulerOnImplThread->setSwapBuffersCompleteSupported( | 941 m_schedulerOnImplThread->setSwapBuffersCompleteSupported( |
| 942 capabilities->usingSwapCompleteCallback); | 942 capabilities->usingSwapCompleteCallback); |
| 943 } | 943 } |
| 944 | 944 |
| 945 int maxFramesPending = FrameRateController::kDefaultMaxFramesPending; | |
| 946 if (m_layerTreeHostImpl->outputSurface()->Capabilities().has_parent_composit
or) | |
| 947 maxFramesPending = 1; | |
| 948 m_schedulerOnImplThread->setMaxFramesPending(maxFramesPending); | |
| 949 | |
| 950 completion->signal(); | 945 completion->signal(); |
| 951 } | 946 } |
| 952 | 947 |
| 953 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) | 948 void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion) |
| 954 { | 949 { |
| 955 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread"); | 950 TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread"); |
| 956 DCHECK(isImplThread()); | 951 DCHECK(isImplThread()); |
| 957 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->res
ourceProvider()); | 952 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->res
ourceProvider()); |
| 958 m_inputHandlerOnImplThread.reset(); | 953 m_inputHandlerOnImplThread.reset(); |
| 959 m_layerTreeHostImpl.reset(); | 954 m_layerTreeHostImpl.reset(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 } | 1010 } |
| 1016 | 1011 |
| 1017 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ
est) | 1012 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ
est) |
| 1018 { | 1013 { |
| 1019 DCHECK(isImplThread()); | 1014 DCHECK(isImplThread()); |
| 1020 request->commitPending = m_schedulerOnImplThread->commitPending(); | 1015 request->commitPending = m_schedulerOnImplThread->commitPending(); |
| 1021 request->completion.signal(); | 1016 request->completion.signal(); |
| 1022 } | 1017 } |
| 1023 | 1018 |
| 1024 } // namespace cc | 1019 } // namespace cc |
| OLD | NEW |