From 41d67d7ab4da1c393497a620a116a854b3c618e7 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 25 Apr 2014 16:58:34 -0700 Subject: Improve SurfaceFlinger PTS estimation Get the next refresh time from DispSync instead of guessing based on the current time. Change-Id: I8dc72a3217bfd4e9b4c905034194d1a298cad69a --- services/surfaceflinger/DisplayHardware/HWComposer.cpp | 2 +- services/surfaceflinger/DisplayHardware/HWComposer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'services/surfaceflinger/DisplayHardware') diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index c4ea8cc..2d63bde 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -821,7 +821,7 @@ status_t HWComposer::setOutputBuffer(int32_t id, const sp& acquireFence, return NO_ERROR; } -sp HWComposer::getLastRetireFence(int32_t id) { +sp HWComposer::getLastRetireFence(int32_t id) const { if (uint32_t(id)>31 || !mAllocatedDisplayIDs.hasBit(id)) return Fence::NO_FENCE; return mDisplayData[id].lastRetireFence; diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h index 9218bf6..e93bb7e 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.h +++ b/services/surfaceflinger/DisplayHardware/HWComposer.h @@ -142,7 +142,7 @@ public: // signal when the h/w composer is completely finished with the frame. // For physical displays, it is no longer being displayed. For virtual // displays, writes to the output buffer are complete. - sp getLastRetireFence(int32_t id); + sp getLastRetireFence(int32_t id) const; /* * Interface to hardware composer's layers functionality. -- cgit v1.1