diff options
author | brianderson <brianderson@chromium.org> | 2016-02-19 21:21:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-20 05:22:17 +0000 |
commit | bb917ddb01a8c3e373d6df02046c69ff00b07254 (patch) | |
tree | 5baac1ba4ed5552d7336b7c6242b68cbe8d792ea /cc/test | |
parent | fe2fee44edf473f083d7b51873d6c9334da8cae2 (diff) | |
download | chromium_src-bb917ddb01a8c3e373d6df02046c69ff00b07254.zip chromium_src-bb917ddb01a8c3e373d6df02046c69ff00b07254.tar.gz chromium_src-bb917ddb01a8c3e373d6df02046c69ff00b07254.tar.bz2 |
cc: Add MainAndImplFrameTimeDelta UMA.
Records how often the main and impl threads are synchronized
when the compositor draws with a new active tree.
Some DCHECKS are disabled for the synchronous compositor
because draws can come in at any time or not at all.
BUG=582749
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1681393003
Cr-Commit-Position: refs/heads/master@{#376628}
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/scheduler_test_common.cc | 8 | ||||
-rw-r--r-- | cc/test/scheduler_test_common.h | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc index b6b1b2b..ef760d2 100644 --- a/cc/test/scheduler_test_common.cc +++ b/cc/test/scheduler_test_common.cc @@ -67,16 +67,20 @@ TestSyntheticBeginFrameSource::TestSyntheticBeginFrameSource( TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() { } -scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create() { +scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create( + bool using_synchronous_renderer_compositor) { scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation = RenderingStatsInstrumentation::Create(); return make_scoped_ptr(new FakeCompositorTimingHistory( + using_synchronous_renderer_compositor, std::move(rendering_stats_instrumentation))); } FakeCompositorTimingHistory::FakeCompositorTimingHistory( + bool using_synchronous_renderer_compositor, scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation) - : CompositorTimingHistory(CompositorTimingHistory::NULL_UMA, + : CompositorTimingHistory(using_synchronous_renderer_compositor, + CompositorTimingHistory::NULL_UMA, rendering_stats_instrumentation.get()), rendering_stats_instrumentation_owned_( std::move(rendering_stats_instrumentation)) {} diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h index 3993c9f..d442aca 100644 --- a/cc/test/scheduler_test_common.h +++ b/cc/test/scheduler_test_common.h @@ -164,7 +164,8 @@ class TestSyntheticBeginFrameSource : public SyntheticBeginFrameSource { class FakeCompositorTimingHistory : public CompositorTimingHistory { public: - static scoped_ptr<FakeCompositorTimingHistory> Create(); + static scoped_ptr<FakeCompositorTimingHistory> Create( + bool using_synchronous_renderer_compositor); ~FakeCompositorTimingHistory() override; void SetAllEstimatesTo(base::TimeDelta duration); @@ -190,7 +191,8 @@ class FakeCompositorTimingHistory : public CompositorTimingHistory { base::TimeDelta DrawDurationEstimate() const override; protected: - FakeCompositorTimingHistory(scoped_ptr<RenderingStatsInstrumentation> + FakeCompositorTimingHistory(bool using_synchronous_renderer_compositor, + scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_owned); scoped_ptr<RenderingStatsInstrumentation> |