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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 if (m_currentResourceUpdateControllerOnImplThread.get()) | 379 if (m_currentResourceUpdateControllerOnImplThread.get()) |
380 m_currentResourceUpdateControllerOnImplThread->discardUploadsToEvictedRe
sources(); | 380 m_currentResourceUpdateControllerOnImplThread->discardUploadsToEvictedRe
sources(); |
381 return true; | 381 return true; |
382 } | 382 } |
383 | 383 |
384 void ThreadProxy::sendManagedMemoryStats() | 384 void ThreadProxy::sendManagedMemoryStats() |
385 { | 385 { |
386 DCHECK(isImplThread()); | 386 DCHECK(isImplThread()); |
387 if (!m_layerTreeHostImpl.get()) | 387 if (!m_layerTreeHostImpl.get()) |
388 return; | 388 return; |
389 if (!m_layerTreeHostImpl->renderer()) | |
390 return; | |
391 if (!m_layerTreeHost->contentsTextureManager()) | 389 if (!m_layerTreeHost->contentsTextureManager()) |
392 return; | 390 return; |
393 | 391 |
394 m_layerTreeHostImpl->renderer()->sendManagedMemoryStats( | 392 m_layerTreeHostImpl->sendManagedMemoryStats( |
395 m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(), | 393 m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(), |
396 m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes()
, | 394 m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes()
, |
397 m_layerTreeHost->contentsTextureManager()->memoryUseBytes()); | 395 m_layerTreeHost->contentsTextureManager()->memoryUseBytes()); |
398 } | 396 } |
399 | 397 |
400 void ThreadProxy::setNeedsRedraw() | 398 void ThreadProxy::setNeedsRedraw() |
401 { | 399 { |
402 DCHECK(isMainThread()); | 400 DCHECK(isMainThread()); |
403 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedraw"); | 401 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedraw"); |
404 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::setFullRootLayerDamag
eOnImplThread, base::Unretained(this))); | 402 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::setFullRootLayerDamag
eOnImplThread, base::Unretained(this))); |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() | 971 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() |
974 : memoryAllocationLimitBytes(0) | 972 : memoryAllocationLimitBytes(0) |
975 { | 973 { |
976 } | 974 } |
977 | 975 |
978 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() | 976 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() |
979 { | 977 { |
980 } | 978 } |
981 | 979 |
982 } // namespace cc | 980 } // namespace cc |
OLD | NEW |