diff options
Diffstat (limited to 'services/surfaceflinger/DispSync.h')
| -rw-r--r-- | services/surfaceflinger/DispSync.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/services/surfaceflinger/DispSync.h b/services/surfaceflinger/DispSync.h index a8524b943c..537c81bc2c 100644 --- a/services/surfaceflinger/DispSync.h +++ b/services/surfaceflinger/DispSync.h @@ -26,11 +26,8 @@ namespace android { // Ignore present (retire) fences if the device doesn't have support for the -// sync framework, or if all phase offsets are zero. The latter is useful -// because it allows us to avoid resync bursts on devices that don't need -// phase-offset VSYNC events. -#if defined(RUNNING_WITHOUT_SYNC_FRAMEWORK) || \ - (VSYNC_EVENT_PHASE_OFFSET_NS == 0 && SF_VSYNC_EVENT_PHASE_OFFSET_NS == 0) +// sync framework +#if defined(RUNNING_WITHOUT_SYNC_FRAMEWORK) static const bool kIgnorePresentFences = true; #else static const bool kIgnorePresentFences = false; @@ -64,7 +61,7 @@ public: virtual void onDispSyncEvent(nsecs_t when) = 0; }; - DispSync(); + DispSync(const char* name); ~DispSync(); // reset clears the resync samples and error value. @@ -114,7 +111,8 @@ public: // given phase offset from the hardware vsync events. The callback is // called from a separate thread and it should return reasonably quickly // (i.e. within a few hundred microseconds). - status_t addEventListener(nsecs_t phase, const sp<Callback>& callback); + status_t addEventListener(const char* name, nsecs_t phase, + const sp<Callback>& callback); // removeEventListener removes an already-registered event callback. Once // this method returns that callback will no longer be called by the @@ -137,10 +135,12 @@ private: void resetErrorLocked(); enum { MAX_RESYNC_SAMPLES = 32 }; - enum { MIN_RESYNC_SAMPLES_FOR_UPDATE = 3 }; + enum { MIN_RESYNC_SAMPLES_FOR_UPDATE = 6 }; enum { NUM_PRESENT_SAMPLES = 8 }; enum { MAX_RESYNC_SAMPLES_WITHOUT_PRESENT = 4 }; + const char* const mName; + // mPeriod is the computed period of the modeled vsync events in // nanoseconds. nsecs_t mPeriod; |