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