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

Side by Side Diff: cc/single_thread_proxy.cc

Issue 11470024: Don't spam the GPU process with memory usage stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years 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
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/texture_uploader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/single_thread_proxy.h" 5 #include "cc/single_thread_proxy.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/draw_quad.h" 8 #include "cc/draw_quad.h"
9 #include "cc/layer_tree_host.h" 9 #include "cc/layer_tree_host.h"
10 #include "cc/output_surface.h" 10 #include "cc/output_surface.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return false; 290 return false;
291 291
292 return m_layerTreeHost->contentsTextureManager()->reduceMemoryOnImplThread(l imitBytes, priorityCutoff, m_layerTreeHostImpl->resourceProvider()); 292 return m_layerTreeHost->contentsTextureManager()->reduceMemoryOnImplThread(l imitBytes, priorityCutoff, m_layerTreeHostImpl->resourceProvider());
293 } 293 }
294 294
295 void SingleThreadProxy::sendManagedMemoryStats() 295 void SingleThreadProxy::sendManagedMemoryStats()
296 { 296 {
297 DCHECK(Proxy::isImplThread()); 297 DCHECK(Proxy::isImplThread());
298 if (!m_layerTreeHostImpl.get()) 298 if (!m_layerTreeHostImpl.get())
299 return; 299 return;
300 if (!m_layerTreeHostImpl->renderer())
301 return;
302 if (!m_layerTreeHost->contentsTextureManager()) 300 if (!m_layerTreeHost->contentsTextureManager())
303 return; 301 return;
304 302
305 m_layerTreeHostImpl->renderer()->sendManagedMemoryStats( 303 m_layerTreeHostImpl->sendManagedMemoryStats(
306 m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(), 304 m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(),
307 m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes() , 305 m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes() ,
308 m_layerTreeHost->contentsTextureManager()->memoryUseBytes()); 306 m_layerTreeHost->contentsTextureManager()->memoryUseBytes());
309 } 307 }
310 308
311 // Called by the legacy scheduling path (e.g. where render_widget does the sched uling) 309 // Called by the legacy scheduling path (e.g. where render_widget does the sched uling)
312 void SingleThreadProxy::compositeImmediately() 310 void SingleThreadProxy::compositeImmediately()
313 { 311 {
314 if (commitAndComposite()) { 312 if (commitAndComposite()) {
315 m_layerTreeHostImpl->swapBuffers(); 313 m_layerTreeHostImpl->swapBuffers();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 388
391 void SingleThreadProxy::didSwapFrame() 389 void SingleThreadProxy::didSwapFrame()
392 { 390 {
393 if (m_nextFrameIsNewlyCommittedFrame) { 391 if (m_nextFrameIsNewlyCommittedFrame) {
394 m_nextFrameIsNewlyCommittedFrame = false; 392 m_nextFrameIsNewlyCommittedFrame = false;
395 m_layerTreeHost->didCommitAndDrawFrame(); 393 m_layerTreeHost->didCommitAndDrawFrame();
396 } 394 }
397 } 395 }
398 396
399 } // namespace cc 397 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/texture_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698