| 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 "CCSingleThreadProxy.h" | 7 #include "CCSingleThreadProxy.h" |
| 8 | 8 |
| 9 #include "CCDrawQuad.h" | 9 #include "CCDrawQuad.h" |
| 10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 m_layerTreeHostImpl->beginCommit(); | 186 m_layerTreeHostImpl->beginCommit(); |
| 187 | 187 |
| 188 m_layerTreeHost->beginCommitOnImplThread(m_layerTreeHostImpl.get()); | 188 m_layerTreeHost->beginCommitOnImplThread(m_layerTreeHostImpl.get()); |
| 189 | 189 |
| 190 // CCTextureUpdateController::updateTextures is non-blocking and will | 190 // CCTextureUpdateController::updateTextures is non-blocking and will |
| 191 // return without updating any textures if the uploader is busy. This | 191 // return without updating any textures if the uploader is busy. This |
| 192 // shouldn't be a problem here as the throttled uploader isn't used in | 192 // shouldn't be a problem here as the throttled uploader isn't used in |
| 193 // single thread mode. For correctness, loop until no more updates are | 193 // single thread mode. For correctness, loop until no more updates are |
| 194 // pending. | 194 // pending. |
| 195 CCResourceProvider* resourceProvider = m_layerTreeHostImpl->resourceProv
ider(); |
| 195 while (queue.hasMoreUpdates()) | 196 while (queue.hasMoreUpdates()) |
| 196 CCTextureUpdateController::updateTextures(m_layerTreeHostImpl->resou
rceProvider(), m_layerTreeHostImpl->renderer()->textureCopier(), m_layerTreeHost
Impl->renderer()->textureUploader(), &queue, maxPartialTextureUpdates()); | 197 CCTextureUpdateController::updateTextures(resourceProvider, resource
Provider->textureUploader(), &queue, maxPartialTextureUpdates()); |
| 197 | 198 |
| 198 m_layerTreeHost->finishCommitOnImplThread(m_layerTreeHostImpl.get()); | 199 m_layerTreeHost->finishCommitOnImplThread(m_layerTreeHostImpl.get()); |
| 199 | 200 |
| 200 m_layerTreeHostImpl->commitComplete(); | 201 m_layerTreeHostImpl->commitComplete(); |
| 201 | 202 |
| 202 #if !ASSERT_DISABLED | 203 #if !ASSERT_DISABLED |
| 203 // In the single-threaded case, the scroll deltas should never be | 204 // In the single-threaded case, the scroll deltas should never be |
| 204 // touched on the impl layer tree. | 205 // touched on the impl layer tree. |
| 205 OwnPtr<CCScrollAndScaleSet> scrollInfo = m_layerTreeHostImpl->processScr
ollDeltas(); | 206 OwnPtr<CCScrollAndScaleSet> scrollInfo = m_layerTreeHostImpl->processScr
ollDeltas(); |
| 206 ASSERT(!scrollInfo->scrolls.size()); | 207 ASSERT(!scrollInfo->scrolls.size()); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 334 |
| 334 void CCSingleThreadProxy::didSwapFrame() | 335 void CCSingleThreadProxy::didSwapFrame() |
| 335 { | 336 { |
| 336 if (m_nextFrameIsNewlyCommittedFrame) { | 337 if (m_nextFrameIsNewlyCommittedFrame) { |
| 337 m_nextFrameIsNewlyCommittedFrame = false; | 338 m_nextFrameIsNewlyCommittedFrame = false; |
| 338 m_layerTreeHost->didCommitAndDrawFrame(); | 339 m_layerTreeHost->didCommitAndDrawFrame(); |
| 339 } | 340 } |
| 340 } | 341 } |
| 341 | 342 |
| 342 } | 343 } |
| OLD | NEW |