| Index: tools/perf/measurements/repaint.py
|
| diff --git a/tools/perf/measurements/repaint.py b/tools/perf/measurements/repaint.py
|
| index 07360517b90969cc8f2c7d7d358d90ee73e24a7f..a56ccb84051cc2514a45096f1112b828b3949cd4 100644
|
| --- a/tools/perf/measurements/repaint.py
|
| +++ b/tools/perf/measurements/repaint.py
|
| @@ -7,13 +7,23 @@
|
|
|
|
|
| class Repaint(page_test.PageTest):
|
| - def __init__(self, mode='viewport', width=None, height=None):
|
| + def __init__(self):
|
| super(Repaint, self).__init__('RunRepaint', False)
|
| self._smoothness_controller = None
|
| self._micro_benchmark_id = None
|
| - self._mode = mode
|
| - self._width = width
|
| - self._height = height
|
| +
|
| + @classmethod
|
| + def AddCommandLineArgs(cls, parser):
|
| + parser.add_option('--mode', type='string',
|
| + default='viewport',
|
| + help='Invalidation mode. '
|
| + 'Supported values: fixed_size, layer, random, viewport.')
|
| + parser.add_option('--width', type='int',
|
| + default=None,
|
| + help='Width of invalidations for fixed_size mode.')
|
| + parser.add_option('--height', type='int',
|
| + default=None,
|
| + help='Height of invalidations for fixed_size mode.')
|
|
|
| def CustomizeBrowserOptions(self, options):
|
| options.AppendExtraBrowserArgs([
|
| @@ -32,11 +42,11 @@
|
| 'chrome.gpuBenchmarking.setRasterizeOnlyVisibleContent();')
|
|
|
| args = {}
|
| - args['mode'] = self._mode
|
| - if self._width:
|
| - args['width'] = self._width
|
| - if self._height:
|
| - args['height'] = self._height
|
| + args['mode'] = self.options.mode
|
| + if self.options.width:
|
| + args['width'] = self.options.width
|
| + if self.options.height:
|
| + args['height'] = self.options.height
|
|
|
| # Enque benchmark
|
| tab.ExecuteJavaScript("""
|
|
|