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

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: resolved nits, TimeDelta throughout the API 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/paint_time_counter.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 cddbec75d02a5a56574fb679414dd5b457445962..4f2827d38b4fb456e226da3e1a0ac59ca8ca77d5 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"
@@ -143,6 +144,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)
@@ -1677,4 +1679,9 @@ skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture()
return layer ? layer->getPicture() : skia::RefPtr<SkPicture>();
}
+void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime)
+{
+ m_paintTimeCounter->SavePaintTime(totalPaintTime);
+}
+
} // namespace cc
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/paint_time_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698