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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 bool CCSingleThreadProxy::commitAndComposite() | 313 bool CCSingleThreadProxy::commitAndComposite() |
314 { | 314 { |
315 ASSERT(CCProxy::isMainThread()); | 315 ASSERT(CCProxy::isMainThread()); |
316 | 316 |
317 if (!m_layerTreeHost->initializeRendererIfNeeded()) | 317 if (!m_layerTreeHost->initializeRendererIfNeeded()) |
318 return false; | 318 return false; |
319 | 319 |
320 // Unlink any texture backings that were deleted | 320 // Unlink any texture backings that were deleted |
321 CCPrioritizedTextureManager::BackingVector evictedContentsTexturesBackings; | 321 CCPrioritizedTextureManager::BackingList evictedContentsTexturesBackings; |
322 { | 322 { |
323 DebugScopedSetImplThread implThread; | 323 DebugScopedSetImplThread implThread; |
324 m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedCon
tentsTexturesBackings); | 324 m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedCon
tentsTexturesBackings); |
325 } | 325 } |
326 m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedCont
entsTexturesBackings); | 326 m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedCont
entsTexturesBackings); |
327 | 327 |
328 scoped_ptr<CCTextureUpdateQueue> queue = make_scoped_ptr(new CCTextureUpdate
Queue); | 328 scoped_ptr<CCTextureUpdateQueue> queue = make_scoped_ptr(new CCTextureUpdate
Queue); |
329 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll
ocationLimitBytes()); | 329 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll
ocationLimitBytes()); |
330 | 330 |
331 if (m_layerTreeHostImpl->contentsTexturesPurged()) | 331 if (m_layerTreeHostImpl->contentsTexturesPurged()) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 void CCSingleThreadProxy::didSwapFrame() | 375 void CCSingleThreadProxy::didSwapFrame() |
376 { | 376 { |
377 if (m_nextFrameIsNewlyCommittedFrame) { | 377 if (m_nextFrameIsNewlyCommittedFrame) { |
378 m_nextFrameIsNewlyCommittedFrame = false; | 378 m_nextFrameIsNewlyCommittedFrame = false; |
379 m_layerTreeHost->didCommitAndDrawFrame(); | 379 m_layerTreeHost->didCommitAndDrawFrame(); |
380 } | 380 } |
381 } | 381 } |
382 | 382 |
383 } | 383 } |
OLD | NEW |