| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCThreadProxy.h" | 7 #include "CCThreadProxy.h" |
| 8 | 8 |
| 9 #include "CCDelayBasedTimeSource.h" | 9 #include "CCDelayBasedTimeSource.h" |
| 10 #include "CCDrawQuad.h" | 10 #include "CCDrawQuad.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 setNeedsForcedCommitOnImplThread(); | 461 setNeedsForcedCommitOnImplThread(); |
| 462 } | 462 } |
| 463 | 463 |
| 464 void CCThreadProxy::scheduledActionBeginFrame() | 464 void CCThreadProxy::scheduledActionBeginFrame() |
| 465 { | 465 { |
| 466 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame"); | 466 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame"); |
| 467 ASSERT(!m_pendingBeginFrameRequest); | 467 ASSERT(!m_pendingBeginFrameRequest); |
| 468 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState()); | 468 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState()); |
| 469 m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasin
gTime(); | 469 m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasin
gTime(); |
| 470 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD
eltas(); | 470 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD
eltas(); |
| 471 m_pendingBeginFrameRequest->implTransform = m_layerTreeHostImpl->implTransfo
rm(); |
| 471 m_pendingBeginFrameRequest->memoryAllocationLimitBytes = m_layerTreeHostImpl
->memoryAllocationLimitBytes(); | 472 m_pendingBeginFrameRequest->memoryAllocationLimitBytes = m_layerTreeHostImpl
->memoryAllocationLimitBytes(); |
| 472 m_layerTreeHost->getEvictedContentTexturesBackings(m_pendingBeginFrameReques
t->evictedContentsTexturesBackings); | 473 m_layerTreeHost->getEvictedContentTexturesBackings(m_pendingBeginFrameReques
t->evictedContentsTexturesBackings); |
| 473 | 474 |
| 474 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr
ame)); | 475 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr
ame)); |
| 475 | 476 |
| 476 if (m_beginFrameCompletionEventOnImplThread) { | 477 if (m_beginFrameCompletionEventOnImplThread) { |
| 477 m_beginFrameCompletionEventOnImplThread->signal(); | 478 m_beginFrameCompletionEventOnImplThread->signal(); |
| 478 m_beginFrameCompletionEventOnImplThread = 0; | 479 m_beginFrameCompletionEventOnImplThread = 0; |
| 479 } | 480 } |
| 480 } | 481 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 505 m_commitRequestSentToImplThread = true; | 506 m_commitRequestSentToImplThread = true; |
| 506 | 507 |
| 507 // On the other hand, the animationRequested flag needs to be cleared | 508 // On the other hand, the animationRequested flag needs to be cleared |
| 508 // here so that any animation requests generated by the apply or animate | 509 // here so that any animation requests generated by the apply or animate |
| 509 // callbacks will trigger another frame. | 510 // callbacks will trigger another frame. |
| 510 m_animateRequested = false; | 511 m_animateRequested = false; |
| 511 | 512 |
| 512 // FIXME: technically, scroll deltas need to be applied for dropped commits
as well. | 513 // FIXME: technically, scroll deltas need to be applied for dropped commits
as well. |
| 513 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me
ssage. | 514 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me
ssage. |
| 514 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo); | 515 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo); |
| 516 m_layerTreeHost->setImplTransform(request->implTransform); |
| 515 | 517 |
| 516 if (!m_inCompositeAndReadback && !m_layerTreeHost->visible()) { | 518 if (!m_inCompositeAndReadback && !m_layerTreeHost->visible()) { |
| 517 m_commitRequested = false; | 519 m_commitRequested = false; |
| 518 m_commitRequestSentToImplThread = false; | 520 m_commitRequestSentToImplThread = false; |
| 519 m_forcedCommitRequested = false; | 521 m_forcedCommitRequested = false; |
| 520 | 522 |
| 521 TRACE_EVENT0("cc", "EarlyOut_NotVisible"); | 523 TRACE_EVENT0("cc", "EarlyOut_NotVisible"); |
| 522 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy:
:beginFrameAbortedOnImplThread)); | 524 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy:
:beginFrameAbortedOnImplThread)); |
| 523 return; | 525 return; |
| 524 } | 526 } |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() | 960 CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() |
| 959 : monotonicFrameBeginTime(0) | 961 : monotonicFrameBeginTime(0) |
| 960 { | 962 { |
| 961 } | 963 } |
| 962 | 964 |
| 963 CCThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() | 965 CCThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() |
| 964 { | 966 { |
| 965 } | 967 } |
| 966 | 968 |
| 967 } // namespace cc | 969 } // namespace cc |
| OLD | NEW |