Commit 43dd14a5 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

cc metrics: Do not report throughput UMA for ui compositor.

Stop reporting the throughput metrics for the UI compositor, since it is
currently bundled with the throughput metrics for the renderer. We could
report these separately, but it's not clear that these would be used for
monitoring the UI performance.

BUG=1005226

Change-Id: Ia1572010737a66ecba114cfbb96239f822c1ea92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810014Reviewed-by: default avatarBehdad Bakhshinategh <behdadb@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697747}
parent 629090af
......@@ -67,8 +67,10 @@ std::string GetFrameSequenceLengthHistogramName(FrameSequenceTrackerType type) {
// FrameSequenceTrackerCollection
FrameSequenceTrackerCollection::FrameSequenceTrackerCollection(
bool is_single_threaded,
CompositorFrameReportingController* compositor_frame_reporting_controller)
: compositor_frame_reporting_controller_(
: is_single_threaded_(is_single_threaded),
compositor_frame_reporting_controller_(
compositor_frame_reporting_controller) {
StartSequence(FrameSequenceTrackerType::kUniversal);
}
......@@ -80,6 +82,8 @@ FrameSequenceTrackerCollection::~FrameSequenceTrackerCollection() {
void FrameSequenceTrackerCollection::StartSequence(
FrameSequenceTrackerType type) {
if (is_single_threaded_)
return;
if (frame_trackers_.contains(type))
return;
auto tracker = base::WrapUnique(new FrameSequenceTracker(type));
......
......@@ -48,8 +48,9 @@ enum FrameSequenceTrackerType {
// submitted frames.
class CC_EXPORT FrameSequenceTrackerCollection {
public:
explicit FrameSequenceTrackerCollection(
CompositorFrameReportingController* = nullptr);
FrameSequenceTrackerCollection(
bool is_single_threaded,
CompositorFrameReportingController* frame_reporting_controller);
~FrameSequenceTrackerCollection();
FrameSequenceTrackerCollection(const FrameSequenceTrackerCollection&) =
......@@ -95,6 +96,7 @@ class CC_EXPORT FrameSequenceTrackerCollection {
private:
friend class FrameSequenceTrackerTest;
const bool is_single_threaded_;
// The callsite can use the type to manipulate the tracker.
base::flat_map<FrameSequenceTrackerType,
std::unique_ptr<FrameSequenceTracker>>
......
......@@ -22,7 +22,8 @@ class FrameSequenceTrackerTest : public testing::Test {
FrameSequenceTrackerTest()
: compositor_frame_reporting_controller_(
std::make_unique<CompositorFrameReportingController>()),
collection_(compositor_frame_reporting_controller_.get()) {
collection_(/* is_single_threaded=*/false,
compositor_frame_reporting_controller_.get()) {
collection_.StartSequence(FrameSequenceTrackerType::kTouchScroll);
tracker_ = collection_.GetTrackerForTesting(
FrameSequenceTrackerType::kTouchScroll);
......
......@@ -319,7 +319,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
is_animating_for_snap_(false),
paint_image_generator_client_id_(PaintImage::GetNextGeneratorClientId()),
scrollbar_controller_(std::make_unique<ScrollbarController>(this)),
frame_trackers_(compositor_frame_reporting_controller_.get()),
frame_trackers_(settings.single_thread_proxy_scheduler,
compositor_frame_reporting_controller_.get()),
scroll_gesture_did_end_(false) {
DCHECK(mutator_host_);
mutator_host_->SetMutatorHostClient(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment