OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 m_beginFrameCompletionEventOnImplThread = completion; | 404 m_beginFrameCompletionEventOnImplThread = completion; |
405 m_schedulerOnImplThread->setNeedsCommit(); | 405 m_schedulerOnImplThread->setNeedsCommit(); |
406 m_schedulerOnImplThread->setNeedsForcedCommit(); | 406 m_schedulerOnImplThread->setNeedsForcedCommit(); |
407 } | 407 } |
408 | 408 |
409 void CCThreadProxy::scheduledActionBeginFrame() | 409 void CCThreadProxy::scheduledActionBeginFrame() |
410 { | 410 { |
411 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame"); | 411 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame"); |
412 ASSERT(!m_pendingBeginFrameRequest); | 412 ASSERT(!m_pendingBeginFrameRequest); |
413 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState()); | 413 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState()); |
414 m_pendingBeginFrameRequest->frameBeginTime = currentTime(); | 414 m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasin
gTime(); |
415 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD
eltas(); | 415 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD
eltas(); |
416 | 416 |
417 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr
ame)); | 417 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr
ame)); |
418 | 418 |
419 if (m_beginFrameCompletionEventOnImplThread) { | 419 if (m_beginFrameCompletionEventOnImplThread) { |
420 m_beginFrameCompletionEventOnImplThread->signal(); | 420 m_beginFrameCompletionEventOnImplThread->signal(); |
421 m_beginFrameCompletionEventOnImplThread = 0; | 421 m_beginFrameCompletionEventOnImplThread = 0; |
422 } | 422 } |
423 } | 423 } |
424 | 424 |
(...skipping 26 matching lines...) Expand all Loading... |
451 // callbacks will trigger another frame. | 451 // callbacks will trigger another frame. |
452 m_animateRequested = false; | 452 m_animateRequested = false; |
453 | 453 |
454 // FIXME: technically, scroll deltas need to be applied for dropped commits
as well. | 454 // FIXME: technically, scroll deltas need to be applied for dropped commits
as well. |
455 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me
ssage. | 455 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me
ssage. |
456 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo); | 456 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo); |
457 | 457 |
458 m_layerTreeHost->willBeginFrame(); | 458 m_layerTreeHost->willBeginFrame(); |
459 | 459 |
460 // FIXME: recreate the context if it was requested by the impl thread. | 460 // FIXME: recreate the context if it was requested by the impl thread. |
461 m_layerTreeHost->updateAnimations(request->frameBeginTime); | 461 m_layerTreeHost->updateAnimations(request->monotonicFrameBeginTime); |
462 m_layerTreeHost->layout(); | 462 m_layerTreeHost->layout(); |
463 | 463 |
464 // Clear the commit flag after updating animations and layout here --- objec
ts that only | 464 // Clear the commit flag after updating animations and layout here --- objec
ts that only |
465 // layout when painted will trigger another setNeedsCommit inside | 465 // layout when painted will trigger another setNeedsCommit inside |
466 // updateLayers. | 466 // updateLayers. |
467 m_commitRequested = false; | 467 m_commitRequested = false; |
468 | 468 |
469 if (!m_layerTreeHost->updateLayers()) | 469 if (!m_layerTreeHost->updateLayers()) |
470 return; | 470 return; |
471 | 471 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->con
tentsTextureAllocator()); | 757 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->con
tentsTextureAllocator()); |
758 *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(c
ontextPtr)); | 758 *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(c
ontextPtr)); |
759 if (*recreateSucceeded) { | 759 if (*recreateSucceeded) { |
760 *capabilities = m_layerTreeHostImpl->layerRendererCapabilities(); | 760 *capabilities = m_layerTreeHostImpl->layerRendererCapabilities(); |
761 m_schedulerOnImplThread->didRecreateContext(); | 761 m_schedulerOnImplThread->didRecreateContext(); |
762 } | 762 } |
763 completion->signal(); | 763 completion->signal(); |
764 } | 764 } |
765 | 765 |
766 } // namespace WebCore | 766 } // namespace WebCore |
OLD | NEW |