| Index: tools/telemetry/telemetry/scrolling_interaction.py
|
| diff --git a/tools/telemetry/telemetry/scrolling_interaction.py b/tools/telemetry/telemetry/scrolling_interaction.py
|
| index a404fb3c6647af61433eed212dc5ced75657f288..552674e7a82066842be8a78173b4fd720d679454 100644
|
| --- a/tools/telemetry/telemetry/scrolling_interaction.py
|
| +++ b/tools/telemetry/telemetry/scrolling_interaction.py
|
| @@ -17,27 +17,29 @@ class ScrollingInteraction(page_interaction.PageInteraction):
|
| # Run scroll test.
|
| tab.runtime.Execute(scroll_js)
|
|
|
| - with tab.browser.platform.GetSurfaceCollector(''):
|
| + if tab.browser.platform.IsRawDisplayFrameRateSupported():
|
| + tab.browser.platform.StartRawDisplayFrameRate('')
|
| + start_scroll_js = """
|
| + window.__renderingStatsDeltas = null;
|
| + new __ScrollTest(function(rendering_stats_deltas) {
|
| + window.__renderingStatsDeltas = rendering_stats_deltas;
|
| + }).start(element);
|
| + """
|
| + # scrollable_element_function is a function that passes the scrollable
|
| + # element on the page to a callback. For example:
|
| + # function (callback) {
|
| + # callback(document.getElementById('foo'));
|
| + # }
|
| + if hasattr(self, 'scrollable_element_function'):
|
| + tab.runtime.Execute('(%s)(function(element) { %s });' %
|
| + (self.scrollable_element_function, start_scroll_js))
|
| + else:
|
| + tab.runtime.Execute(
|
| + '(function() { var element = document.body; %s})();' %
|
| + start_scroll_js)
|
|
|
| - start_scroll_js = """
|
| - window.__renderingStatsDeltas = null;
|
| - new __ScrollTest(function(rendering_stats_deltas) {
|
| - window.__renderingStatsDeltas = rendering_stats_deltas;
|
| - }).start(element);
|
| - """
|
| - # scrollable_element_function is a function that passes the scrollable
|
| - # element on the page to a callback. For example:
|
| - # function (callback) {
|
| - # callback(document.getElementById('foo'));
|
| - # }
|
| - if hasattr(self, 'scrollable_element_function'):
|
| - tab.runtime.Execute('(%s)(function(element) { %s });' %
|
| - (self.scrollable_element_function, start_scroll_js))
|
| - else:
|
| - tab.runtime.Execute(
|
| - '(function() { var element = document.body; %s})();' %
|
| - start_scroll_js)
|
| -
|
| - # Poll for scroll benchmark completion.
|
| - util.WaitFor(lambda: tab.runtime.Evaluate(
|
| - 'window.__renderingStatsDeltas'), 60)
|
| + # Poll for scroll benchmark completion.
|
| + util.WaitFor(lambda: tab.runtime.Evaluate(
|
| + 'window.__renderingStatsDeltas'), 60)
|
| + if tab.browser.platform.IsRawDisplayFrameRateSupported():
|
| + tab.browser.platform.GetRawDisplayFrameRate()
|
|
|