| 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 "cc/single_thread_proxy.h" | 7 #include "cc/single_thread_proxy.h" |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "cc/draw_quad.h" | 10 #include "cc/draw_quad.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 } | 331 } |
| 332 | 332 |
| 333 bool SingleThreadProxy::commitAndComposite() | 333 bool SingleThreadProxy::commitAndComposite() |
| 334 { | 334 { |
| 335 DCHECK(Proxy::isMainThread()); | 335 DCHECK(Proxy::isMainThread()); |
| 336 | 336 |
| 337 if (!m_layerTreeHost->initializeRendererIfNeeded()) | 337 if (!m_layerTreeHost->initializeRendererIfNeeded()) |
| 338 return false; | 338 return false; |
| 339 | 339 |
| 340 // Unlink any texture backings that were deleted | 340 // Unlink any texture backings that were deleted |
| 341 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; | 341 m_layerTreeHost->contentsTextureManager()->unlinkAndClearEvictedBackings(); |
| 342 { | |
| 343 DebugScopedSetImplThread implThread; | |
| 344 m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedCon
tentsTexturesBackings); | |
| 345 } | |
| 346 m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedCont
entsTexturesBackings); | |
| 347 | 342 |
| 348 scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQu
eue); | 343 scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQu
eue); |
| 349 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll
ocationLimitBytes()); | 344 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll
ocationLimitBytes()); |
| 350 | 345 |
| 351 if (m_layerTreeHostImpl->contentsTexturesPurged()) | 346 if (m_layerTreeHostImpl->contentsTexturesPurged()) |
| 352 m_layerTreeHostImpl->resetContentsTexturesPurged(); | 347 m_layerTreeHostImpl->resetContentsTexturesPurged(); |
| 353 | 348 |
| 354 m_layerTreeHost->willCommit(); | 349 m_layerTreeHost->willCommit(); |
| 355 doCommit(queue.Pass()); | 350 doCommit(queue.Pass()); |
| 356 bool result = doComposite(); | 351 bool result = doComposite(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 387 |
| 393 void SingleThreadProxy::didSwapFrame() | 388 void SingleThreadProxy::didSwapFrame() |
| 394 { | 389 { |
| 395 if (m_nextFrameIsNewlyCommittedFrame) { | 390 if (m_nextFrameIsNewlyCommittedFrame) { |
| 396 m_nextFrameIsNewlyCommittedFrame = false; | 391 m_nextFrameIsNewlyCommittedFrame = false; |
| 397 m_layerTreeHost->didCommitAndDrawFrame(); | 392 m_layerTreeHost->didCommitAndDrawFrame(); |
| 398 } | 393 } |
| 399 } | 394 } |
| 400 | 395 |
| 401 } | 396 } |
| OLD | NEW |