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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 12149004: [cc] Show GPU memory usage and overage below FPS counter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index e846f1d32a818014a5679ff4ad39c03e2f0fa9d2..2896bc1b151f285969ae00bfd2a73fb32324ca85 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -25,6 +25,7 @@
#include "cc/layer_tree_host_common.h"
#include "cc/layer_tree_impl.h"
#include "cc/math_util.h"
+#include "cc/memory_history.h"
#include "cc/overdraw_metrics.h"
#include "cc/page_scale_animation.h"
#include "cc/paint_time_counter.h"
@@ -148,6 +149,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(const LayerTreeSettings& settings, LayerTre
, m_pinchGestureActive(false)
, m_fpsCounter(FrameRateCounter::create(m_proxy->hasImplThread()))
, m_paintTimeCounter(PaintTimeCounter::create())
+ , m_memoryHistory(MemoryHistory::create())
, m_debugRectHistory(DebugRectHistory::create())
, m_numImplThreadScrolls(0)
, m_numMainThreadScrolls(0)
@@ -788,6 +790,11 @@ void LayerTreeHostImpl::drawLayers(FrameData& frame)
// RenderWidget.
m_fpsCounter->saveTimeStamp(base::TimeTicks::Now());
+ if (m_tileManager) {
+ m_memoryHistory->SaveEntry(
+ m_tileManager->memory_stats_from_last_assign());
+ }
+
if (m_debugState.showHudRects())
m_debugRectHistory->saveDebugRectsForCurrentFrame(rootLayer(), *frame.renderSurfaceLayerList, frame.occludingScreenSpaceRects, frame.nonOccludingScreenSpaceRects, m_debugState);
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698