| Index: tools/perf/measurements/multipage_skpicture_printer.py
|
| diff --git a/tools/perf/measurements/skpicture_printer.py b/tools/perf/measurements/multipage_skpicture_printer.py
|
| similarity index 57%
|
| copy from tools/perf/measurements/skpicture_printer.py
|
| copy to tools/perf/measurements/multipage_skpicture_printer.py
|
| index 499aa4893341dd336601255d84470a4cbb2b5859..92096b584a33d178a6aa7a32657da4640a94da5e 100644
|
| --- a/tools/perf/measurements/skpicture_printer.py
|
| +++ b/tools/perf/measurements/multipage_skpicture_printer.py
|
| @@ -1,4 +1,4 @@
|
| -# Copyright 2012 The Chromium Authors. All rights reserved.
|
| +# Copyright 2016 The Chromium Authors. All rights reserved.
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
| import glob
|
| @@ -8,14 +8,14 @@ from telemetry.page import legacy_page_test
|
| from telemetry.value import scalar
|
|
|
|
|
| -_JS = 'chrome.gpuBenchmarking.printToSkPicture("{0}");'
|
| +_JS = 'chrome.gpuBenchmarking.printPagesToSkPictures("{0}");'
|
|
|
|
|
| -class SkpicturePrinter(legacy_page_test.LegacyPageTest):
|
| +class MultipageSkpicturePrinter(legacy_page_test.LegacyPageTest):
|
|
|
| - def __init__(self, skp_outdir):
|
| - super(SkpicturePrinter, self).__init__()
|
| - self._skp_outdir = skp_outdir
|
| + def __init__(self, mskp_outdir):
|
| + super(MultipageSkpicturePrinter, self).__init__()
|
| + self._mskp_outdir = mskp_outdir
|
|
|
| def CustomizeBrowserOptions(self, options):
|
| options.AppendExtraBrowserArgs(['--enable-gpu-benchmarking',
|
| @@ -25,13 +25,10 @@ class SkpicturePrinter(legacy_page_test.LegacyPageTest):
|
| def ValidateAndMeasurePage(self, page, tab, results):
|
| if tab.browser.platform.GetOSName() in ['android', 'chromeos']:
|
| raise legacy_page_test.MeasurementFailure(
|
| - 'SkPicture printing not supported on this platform')
|
| + 'Multipage SkPicture printing not supported on this platform')
|
|
|
| # Replace win32 path separator char '\' with '\\'.
|
| outpath = os.path.abspath(
|
| - os.path.join(self._skp_outdir, page.file_safe_name))
|
| + os.path.join(self._mskp_outdir, page.file_safe_name + '.mskp'))
|
| js = _JS.format(outpath.replace('\\', '\\\\'))
|
| tab.EvaluateJavaScript(js)
|
| - pictures = glob.glob(os.path.join(outpath, '*.skp'))
|
| - results.AddValue(scalar.ScalarValue(
|
| - results.current_page, 'saved_picture_count', 'count', len(pictures)))
|
|
|