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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 } | 705 } |
706 | 706 |
707 void CCThreadProxy::initializeImplOnImplThread(CCCompletionEvent* completion) | 707 void CCThreadProxy::initializeImplOnImplThread(CCCompletionEvent* completion) |
708 { | 708 { |
709 TRACE_EVENT("CCThreadProxy::initializeImplOnImplThread", this, 0); | 709 TRACE_EVENT("CCThreadProxy::initializeImplOnImplThread", this, 0); |
710 ASSERT(isImplThread()); | 710 ASSERT(isImplThread()); |
711 m_layerTreeHostImpl = m_layerTreeHost->createLayerTreeHostImpl(this); | 711 m_layerTreeHostImpl = m_layerTreeHost->createLayerTreeHostImpl(this); |
712 const double displayRefreshInterval = 1.0 / 60.0; | 712 const double displayRefreshInterval = 1.0 / 60.0; |
713 OwnPtr<CCFrameRateController> frameRateController = adoptPtr(new CCFrameRate
Controller(CCDelayBasedTimeSource::create(displayRefreshInterval, CCProxy::implT
hread()))); | 713 OwnPtr<CCFrameRateController> frameRateController = adoptPtr(new CCFrameRate
Controller(CCDelayBasedTimeSource::create(displayRefreshInterval, CCProxy::implT
hread()))); |
714 m_schedulerOnImplThread = CCScheduler::create(this, frameRateController.rele
ase()); | 714 m_schedulerOnImplThread = CCScheduler::create(this, frameRateController.rele
ase()); |
| 715 m_schedulerOnImplThread->setCanBeginFrame(true); // FIXME: Set this when we
actually can begin a frame. |
715 m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible()); | 716 m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible()); |
716 | 717 |
717 m_inputHandlerOnImplThread = CCInputHandler::create(m_layerTreeHostImpl.get(
)); | 718 m_inputHandlerOnImplThread = CCInputHandler::create(m_layerTreeHostImpl.get(
)); |
718 m_compositorIdentifier = m_inputHandlerOnImplThread->identifier(); | 719 m_compositorIdentifier = m_inputHandlerOnImplThread->identifier(); |
719 | 720 |
720 completion->signal(); | 721 completion->signal(); |
721 } | 722 } |
722 | 723 |
723 void CCThreadProxy::initializeContextOnImplThread(GraphicsContext3D* context) | 724 void CCThreadProxy::initializeContextOnImplThread(GraphicsContext3D* context) |
724 { | 725 { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->con
tentsTextureAllocator()); | 772 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->con
tentsTextureAllocator()); |
772 *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(c
ontextPtr)); | 773 *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(c
ontextPtr)); |
773 if (*recreateSucceeded) { | 774 if (*recreateSucceeded) { |
774 *capabilities = m_layerTreeHostImpl->layerRendererCapabilities(); | 775 *capabilities = m_layerTreeHostImpl->layerRendererCapabilities(); |
775 m_schedulerOnImplThread->didRecreateContext(); | 776 m_schedulerOnImplThread->didRecreateContext(); |
776 } | 777 } |
777 completion->signal(); | 778 completion->signal(); |
778 } | 779 } |
779 | 780 |
780 } // namespace WebCore | 781 } // namespace WebCore |
OLD | NEW |