Chromium Code Reviews| 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 "cc/thread_proxy.h" | 5 #include "cc/thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/delay_based_time_source.h" | 9 #include "cc/delay_based_time_source.h" |
| 10 #include "cc/draw_quad.h" | 10 #include "cc/draw_quad.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 390 } | 390 } |
| 391 | 391 |
| 392 void ThreadProxy::sendManagedMemoryStats() | 392 void ThreadProxy::sendManagedMemoryStats() |
| 393 { | 393 { |
| 394 DCHECK(isImplThread()); | 394 DCHECK(isImplThread()); |
| 395 if (!m_layerTreeHostImpl.get()) | 395 if (!m_layerTreeHostImpl.get()) |
| 396 return; | 396 return; |
| 397 if (!m_layerTreeHost->contentsTextureManager()) | 397 if (!m_layerTreeHost->contentsTextureManager()) |
| 398 return; | 398 return; |
| 399 | 399 |
| 400 // If we are using impl-side painting, then sendManagedMemoryStats is called | |
| 401 // through the tile manager's manage function. | |
| 402 if (m_layerTreeHostImpl->tileManager()) | |
|
nduca
2012/12/28 02:16:03
Shoud we use settings.implSidePainting? I dont hav
ccameron
2012/12/28 19:56:00
Yes, that's the right signal.
| |
| 403 return; | |
| 404 | |
| 400 m_layerTreeHostImpl->sendManagedMemoryStats( | 405 m_layerTreeHostImpl->sendManagedMemoryStats( |
| 401 m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(), | 406 m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(), |
| 402 m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes() , | 407 m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes() , |
| 403 m_layerTreeHost->contentsTextureManager()->memoryUseBytes()); | 408 m_layerTreeHost->contentsTextureManager()->memoryUseBytes()); |
| 404 } | 409 } |
| 405 | 410 |
| 406 void ThreadProxy::setNeedsRedraw() | 411 void ThreadProxy::setNeedsRedraw() |
| 407 { | 412 { |
| 408 DCHECK(isMainThread()); | 413 DCHECK(isMainThread()); |
| 409 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedraw"); | 414 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedraw"); |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1006 } | 1011 } |
| 1007 | 1012 |
| 1008 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est) | 1013 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est) |
| 1009 { | 1014 { |
| 1010 DCHECK(isImplThread()); | 1015 DCHECK(isImplThread()); |
| 1011 request->commitPending = m_schedulerOnImplThread->commitPending(); | 1016 request->commitPending = m_schedulerOnImplThread->commitPending(); |
| 1012 request->completion.signal(); | 1017 request->completion.signal(); |
| 1013 } | 1018 } |
| 1014 | 1019 |
| 1015 } // namespace cc | 1020 } // namespace cc |
| OLD | NEW |