Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp

Issue 10202004: Merge 114599 - [chromium] Add canBeginFrame state to CCSchedulerStateMachine to suppress initializa… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698