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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11827009: cc: add PaintTimeCounter to keep track of per frame paint time (Closed) Base URL: http://git.chromium.org/chromium/src.git@ring
Patch Set: updated to new RingBuffer 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
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index d5268492ea94ab8cc7433aab35f5b851ca9a1fb4..f2393e7b5145b7cb85c79c45f9b2d1f610e52d2a 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -26,6 +26,7 @@
#include "cc/math_util.h"
#include "cc/overdraw_metrics.h"
#include "cc/page_scale_animation.h"
+#include "cc/paint_time_counter.h"
#include "cc/prioritized_resource_manager.h"
#include "cc/quad_culler.h"
#include "cc/render_pass_draw_quad.h"
@@ -141,6 +142,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(const LayerTreeSettings& settings, LayerTre
, m_needsUpdateDrawProperties(false)
, m_pinchGestureActive(false)
, m_fpsCounter(FrameRateCounter::create(m_proxy->hasImplThread()))
+ , m_paintTimeCounter(PaintTimeCounter::create())
, m_debugRectHistory(DebugRectHistory::create())
, m_numImplThreadScrolls(0)
, m_numMainThreadScrolls(0)
@@ -1653,4 +1655,9 @@ skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture()
return layer ? layer->getPicture() : skia::RefPtr<SkPicture>();
}
+void LayerTreeHostImpl::savePaintTime(double totalPaintTimeInSeconds)
+{
+ m_paintTimeCounter->SavePaintTime(totalPaintTimeInSeconds * 1000);
+}
+
} // namespace cc
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/paint_time_counter.h » ('j') | cc/paint_time_counter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698