Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: cc/thread_proxy.cc

Issue 11637022: Send memory management policies to the tile manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/managed_memory_policy.cc ('k') | cc/tile_manager.h » ('j') | cc/tile_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698