Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: tools/perf/measurements/repaint.py

Issue 1098543002: CL for perf tryjob on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/benchmarks/repaint.py ('k') | tools/perf/measurements/repaint_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/repaint.py
diff --git a/tools/perf/measurements/repaint.py b/tools/perf/measurements/repaint.py
index 14bb032b1c11cae3aa2541204108648255195c52..ec4e5f1ba01282d50d664ea44a2d83bb241801db 100644
--- a/tools/perf/measurements/repaint.py
+++ b/tools/perf/measurements/repaint.py
@@ -8,13 +8,9 @@ from measurements import smoothness_controller
class Repaint(page_test.PageTest):
- def __init__(self, mode='viewport', width=None, height=None):
+ def __init__(self):
super(Repaint, self).__init__()
self._smoothness_controller = None
- self._micro_benchmark_id = None
- self._mode = mode
- self._width = width
- self._height = height
def CustomizeBrowserOptions(self, options):
options.AppendExtraBrowserArgs([
@@ -29,42 +25,8 @@ class Repaint(page_test.PageTest):
auto_issuing_marker=False)
self._smoothness_controller.SetUp(page, tab)
self._smoothness_controller.Start(tab)
- # Rasterize only what's visible.
- tab.ExecuteJavaScript(
- 'chrome.gpuBenchmarking.setRasterizeOnlyVisibleContent();')
-
- args = {}
- args['mode'] = self._mode
- if self._width:
- args['width'] = self._width
- if self._height:
- args['height'] = self._height
-
- # Enque benchmark
- tab.ExecuteJavaScript("""
- window.benchmark_results = {};
- window.benchmark_results.id =
- chrome.gpuBenchmarking.runMicroBenchmark(
- "invalidation_benchmark",
- function(value) {},
- """ + str(args) + """
- );
- """)
-
- self._micro_benchmark_id = tab.EvaluateJavaScript(
- 'window.benchmark_results.id')
- if (not self._micro_benchmark_id):
- raise page_test.MeasurementFailure(
- 'Failed to schedule invalidation_benchmark.')
def DidRunActions(self, page, tab):
- tab.ExecuteJavaScript("""
- window.benchmark_results.message_handled =
- chrome.gpuBenchmarking.sendMessageToMicroBenchmark(
- """ + str(self._micro_benchmark_id) + """, {
- "notify_done": true
- });
- """)
self._smoothness_controller.Stop(tab)
def ValidateAndMeasurePage(self, page, tab, results):
« no previous file with comments | « tools/perf/benchmarks/repaint.py ('k') | tools/perf/measurements/repaint_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698