From 3feb702898b9707e89196330749db1eb8a6dea1e Mon Sep 17 00:00:00 2001 From: jummp01 Date: Thu, 2 Feb 2017 17:32:12 +0000 Subject: [PATCH] fps: move VSYNC_INTERVAL into utils It is not anything to do with instrument, but a generic ocnstant, and this way it can be used by the other parts of the code line. --- wlauto/instrumentation/fps/__init__.py | 5 ++--- wlauto/utils/fps.py | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wlauto/instrumentation/fps/__init__.py b/wlauto/instrumentation/fps/__init__.py index 54fb353d..9cadeebd 100755 --- a/wlauto/instrumentation/fps/__init__.py +++ b/wlauto/instrumentation/fps/__init__.py @@ -39,10 +39,9 @@ from wlauto.instrumentation import instrument_is_installed from wlauto.exceptions import (InstrumentError, WorkerThreadError, ConfigError, DeviceNotRespondingError, TimeoutError) from wlauto.utils.types import boolean, numeric -from wlauto.utils.fps import FpsProcessor, SurfaceFlingerFrame, GfxInfoFrame, GFXINFO_EXEMPT +from wlauto.utils.fps import (FpsProcessor, SurfaceFlingerFrame, GfxInfoFrame, GFXINFO_EXEMPT, + VSYNC_INTERVAL) - -VSYNC_INTERVAL = 16666667 PAUSE_LATENCY = 20 EPSYLON = 0.0001 diff --git a/wlauto/utils/fps.py b/wlauto/utils/fps.py index 84016622..735be824 100755 --- a/wlauto/utils/fps.py +++ b/wlauto/utils/fps.py @@ -29,6 +29,8 @@ GfxInfoFrame = collections.namedtuple('GfxInfoFrame', 'Flags IntendedVsync Vsync # Android M: WindowLayoutChanged | SurfaceCanvas GFXINFO_EXEMPT = 1 | 4 +VSYNC_INTERVAL = 16666667 + class FpsProcessor(object): """