| 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 557 |
| 558 m_beginFrameCompletionEventOnImplThread = completion; | 558 m_beginFrameCompletionEventOnImplThread = completion; |
| 559 } | 559 } |
| 560 | 560 |
| 561 void ThreadProxy::scheduledActionBeginFrame() | 561 void ThreadProxy::scheduledActionBeginFrame() |
| 562 { | 562 { |
| 563 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionBeginFrame"); | 563 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionBeginFrame"); |
| 564 scoped_ptr<BeginFrameAndCommitState> beginFrameState(new BeginFrameAndCommit
State); | 564 scoped_ptr<BeginFrameAndCommitState> beginFrameState(new BeginFrameAndCommit
State); |
| 565 beginFrameState->monotonicFrameBeginTime = base::TimeTicks::Now(); | 565 beginFrameState->monotonicFrameBeginTime = base::TimeTicks::Now(); |
| 566 beginFrameState->scrollInfo = m_layerTreeHostImpl->processScrollDeltas(); | 566 beginFrameState->scrollInfo = m_layerTreeHostImpl->processScrollDeltas(); |
| 567 beginFrameState->implTransform = m_layerTreeHostImpl->implTransform(); | 567 beginFrameState->implTransform = m_layerTreeHostImpl->activeTree()->ImplTran
sform(); |
| 568 DCHECK_GT(m_layerTreeHostImpl->memoryAllocationLimitBytes(), 0u); | 568 DCHECK_GT(m_layerTreeHostImpl->memoryAllocationLimitBytes(), 0u); |
| 569 beginFrameState->memoryAllocationLimitBytes = m_layerTreeHostImpl->memoryAll
ocationLimitBytes(); | 569 beginFrameState->memoryAllocationLimitBytes = m_layerTreeHostImpl->memoryAll
ocationLimitBytes(); |
| 570 Proxy::mainThread()->postTask(base::Bind(&ThreadProxy::beginFrame, m_mainThr
eadWeakPtr, base::Passed(&beginFrameState))); | 570 Proxy::mainThread()->postTask(base::Bind(&ThreadProxy::beginFrame, m_mainThr
eadWeakPtr, base::Passed(&beginFrameState))); |
| 571 | 571 |
| 572 if (m_beginFrameCompletionEventOnImplThread) { | 572 if (m_beginFrameCompletionEventOnImplThread) { |
| 573 m_beginFrameCompletionEventOnImplThread->signal(); | 573 m_beginFrameCompletionEventOnImplThread->signal(); |
| 574 m_beginFrameCompletionEventOnImplThread = 0; | 574 m_beginFrameCompletionEventOnImplThread = 0; |
| 575 } | 575 } |
| 576 } | 576 } |
| 577 | 577 |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 | 1174 |
| 1175 void ThreadProxy::renewTreePriorityOnImplThread() | 1175 void ThreadProxy::renewTreePriorityOnImplThread() |
| 1176 { | 1176 { |
| 1177 DCHECK(m_renewTreePriorityOnImplThreadPending); | 1177 DCHECK(m_renewTreePriorityOnImplThreadPending); |
| 1178 m_renewTreePriorityOnImplThreadPending = false; | 1178 m_renewTreePriorityOnImplThreadPending = false; |
| 1179 | 1179 |
| 1180 renewTreePriority(); | 1180 renewTreePriority(); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 } // namespace cc | 1183 } // namespace cc |
| OLD | NEW |