OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 import sys |
| 7 |
| 8 # Get build/android scripts into our path. |
| 9 sys.path.append( |
| 10 os.path.abspath( |
| 11 os.path.join(os.path.dirname(__file__), |
| 12 '../../../build/android'))) |
| 13 try: |
| 14 from pylib import surface_stats_collector # pylint: disable=F0401 |
| 15 except Exception: |
| 16 surface_stats_collector = None |
| 17 |
| 18 |
| 19 class AndroidPlatform(object): |
| 20 def __init__(self, adb, window_package, window_activity): |
| 21 super(AndroidPlatform, self).__init__() |
| 22 self._surface_collector = surface_stats_collector.SurfaceStatsCollector( |
| 23 adb, window_package, window_activity) |
| 24 |
| 25 def StartSurfaceCollector(self): |
| 26 self._surface_collector.Start() |
| 27 |
| 28 def StopSurfaceCollector(self): |
| 29 self._surface_collector.PrintPerfResults('') |
| 30 self._surface_collector.Stop() |
OLD | NEW |