Index: tools/perf/perf_tools/smoothness_benchmark.py |
diff --git a/tools/perf/perf_tools/smoothness_benchmark.py b/tools/perf/perf_tools/smoothness_benchmark.py |
index 190061519ffa1f6b2ff79e5800878a49e4b7ded2..cf3fd297f955380487942d941a8b0064ea7654dc 100644 |
--- a/tools/perf/perf_tools/smoothness_benchmark.py |
+++ b/tools/perf/perf_tools/smoothness_benchmark.py |
@@ -164,6 +164,8 @@ class SmoothnessBenchmark(page_benchmark.PageBenchmark): |
return hasattr(page, 'smoothness') |
def WillRunAction(self, page, tab, action): |
+ if tab.browser.platform.IsRawDisplayFrameRateSupported(): |
+ tab.browser.platform.StartRawDisplayFrameRateMeasurement() |
self._measurement = smoothness_measurement.SmoothnessMeasurement(tab) |
if action.CanBeBound(): |
self._measurement.BindToAction(action) |
@@ -171,6 +173,8 @@ class SmoothnessBenchmark(page_benchmark.PageBenchmark): |
self._measurement.Start() |
def DidRunAction(self, page, tab, action): |
+ if tab.browser.platform.IsRawDisplayFrameRateSupported(): |
+ tab.browser.platform.StopRawDisplayFrameRateMeasurement() |
if not action.CanBeBound(): |
self._measurement.Stop() |
@@ -200,3 +204,7 @@ class SmoothnessBenchmark(page_benchmark.PageBenchmark): |
if self.options.report_all_results: |
for k, v in rendering_stats_deltas.iteritems(): |
results.Add(k, '', v) |
+ |
+ if tab.browser.platform.IsRawDisplayFrameRateSupported(): |
+ for r in tab.browser.platform.GetRawDisplayFrameRateMeasurement(): |
Sami
2013/03/08 18:22:20
Nit: might be more idiomatic to do
for name, u
Sami
2013/03/08 18:23:58
Ah, just realized we're not getting back a tuple b
bulach
2013/03/11 10:18:01
Done.
|
+ results.Add(r.name, r.unit, r.value) |