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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 12035038: Added a UMA metric to track slow path scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layer_tree
Patch Set: Moved the UMA_HISTOGRAM_BOOLEAN(false) to just before return ScrollStarted 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 | « no previous file | no next file » | 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 42aa9533c928df6b108bf063cb76bb91c546d130..85ce7382d7ab79771109a6562a9af764daec0723 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/debug/trace_event.h"
#include "base/json/json_writer.h"
+#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "cc/append_quads_data.h"
#include "cc/compositor_frame_metadata.h"
@@ -479,7 +480,7 @@ bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame)
RenderPass::Id contributingRenderPassId = it->firstContributingRenderPassId();
while (frame.renderPassesById.find(contributingRenderPassId) != frame.renderPassesById.end()) {
RenderPass* renderPass = frame.renderPassesById[contributingRenderPassId];
-
+
AppendQuadsData appendQuadsData(renderPass->id);
appendQuadsForLayer(renderPass, *it, occlusionTracker, appendQuadsData);
@@ -1219,6 +1220,7 @@ InputHandlerClient::ScrollStatus LayerTreeHostImpl::scrollBegin(gfx::Point viewp
// The content layer can also block attempts to scroll outside the main thread.
if (layerImpl->tryScroll(deviceViewportPoint, type) == ScrollOnMainThread) {
m_numMainThreadScrolls++;
+ UMA_HISTOGRAM_BOOLEAN("TryScroll.SlowScroll", true);
return ScrollOnMainThread;
}
@@ -1231,6 +1233,7 @@ InputHandlerClient::ScrollStatus LayerTreeHostImpl::scrollBegin(gfx::Point viewp
// If any layer wants to divert the scroll event to the main thread, abort.
if (status == ScrollOnMainThread) {
m_numMainThreadScrolls++;
+ UMA_HISTOGRAM_BOOLEAN("TryScroll.SlowScroll", true);
return ScrollOnMainThread;
}
@@ -1246,6 +1249,7 @@ InputHandlerClient::ScrollStatus LayerTreeHostImpl::scrollBegin(gfx::Point viewp
m_scrollDeltaIsInViewportSpace = (type == Gesture);
m_numImplThreadScrolls++;
m_client->renewTreePriority();
+ UMA_HISTOGRAM_BOOLEAN("TryScroll.SlowScroll", false);
return ScrollStarted;
}
return ScrollIgnored;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698