| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 setNeedsForcedCommitOnImplThread(); | 453 setNeedsForcedCommitOnImplThread(); |
| 454 } | 454 } |
| 455 | 455 |
| 456 void CCThreadProxy::scheduledActionBeginFrame() | 456 void CCThreadProxy::scheduledActionBeginFrame() |
| 457 { | 457 { |
| 458 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame"); | 458 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame"); |
| 459 ASSERT(!m_pendingBeginFrameRequest); | 459 ASSERT(!m_pendingBeginFrameRequest); |
| 460 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState()); | 460 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState()); |
| 461 m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasin
gTime(); | 461 m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasin
gTime(); |
| 462 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD
eltas(); | 462 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD
eltas(); |
| 463 m_pendingBeginFrameRequest->implTransform = m_layerTreeHostImpl->implTransfo
rm(); |
| 463 m_pendingBeginFrameRequest->memoryAllocationLimitBytes = m_layerTreeHostImpl
->memoryAllocationLimitBytes(); | 464 m_pendingBeginFrameRequest->memoryAllocationLimitBytes = m_layerTreeHostImpl
->memoryAllocationLimitBytes(); |
| 464 m_layerTreeHost->getEvictedContentTexturesBackings(m_pendingBeginFrameReques
t->evictedContentsTexturesBackings); | 465 m_layerTreeHost->getEvictedContentTexturesBackings(m_pendingBeginFrameReques
t->evictedContentsTexturesBackings); |
| 465 | 466 |
| 466 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr
ame)); | 467 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr
ame)); |
| 467 | 468 |
| 468 if (m_beginFrameCompletionEventOnImplThread) { | 469 if (m_beginFrameCompletionEventOnImplThread) { |
| 469 m_beginFrameCompletionEventOnImplThread->signal(); | 470 m_beginFrameCompletionEventOnImplThread->signal(); |
| 470 m_beginFrameCompletionEventOnImplThread = 0; | 471 m_beginFrameCompletionEventOnImplThread = 0; |
| 471 } | 472 } |
| 472 } | 473 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 497 m_commitRequestSentToImplThread = true; | 498 m_commitRequestSentToImplThread = true; |
| 498 | 499 |
| 499 // On the other hand, the animationRequested flag needs to be cleared | 500 // On the other hand, the animationRequested flag needs to be cleared |
| 500 // here so that any animation requests generated by the apply or animate | 501 // here so that any animation requests generated by the apply or animate |
| 501 // callbacks will trigger another frame. | 502 // callbacks will trigger another frame. |
| 502 m_animateRequested = false; | 503 m_animateRequested = false; |
| 503 | 504 |
| 504 // FIXME: technically, scroll deltas need to be applied for dropped commits
as well. | 505 // FIXME: technically, scroll deltas need to be applied for dropped commits
as well. |
| 505 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me
ssage. | 506 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me
ssage. |
| 506 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo); | 507 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo); |
| 508 m_layerTreeHost->setImplTransform(request->implTransform); |
| 507 | 509 |
| 508 if (!m_inCompositeAndReadback && !m_layerTreeHost->visible()) { | 510 if (!m_inCompositeAndReadback && !m_layerTreeHost->visible()) { |
| 509 m_commitRequested = false; | 511 m_commitRequested = false; |
| 510 m_commitRequestSentToImplThread = false; | 512 m_commitRequestSentToImplThread = false; |
| 511 m_forcedCommitRequested = false; | 513 m_forcedCommitRequested = false; |
| 512 | 514 |
| 513 TRACE_EVENT0("cc", "EarlyOut_NotVisible"); | 515 TRACE_EVENT0("cc", "EarlyOut_NotVisible"); |
| 514 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy:
:beginFrameAbortedOnImplThread)); | 516 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy:
:beginFrameAbortedOnImplThread)); |
| 515 return; | 517 return; |
| 516 } | 518 } |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() | 934 CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() |
| 933 : monotonicFrameBeginTime(0) | 935 : monotonicFrameBeginTime(0) |
| 934 { | 936 { |
| 935 } | 937 } |
| 936 | 938 |
| 937 CCThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() | 939 CCThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() |
| 938 { | 940 { |
| 939 } | 941 } |
| 940 | 942 |
| 941 } // namespace cc | 943 } // namespace cc |
| OLD | NEW |