diff options
Diffstat (limited to 'include/ui/Fence.h')
-rw-r--r-- | include/ui/Fence.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/ui/Fence.h b/include/ui/Fence.h index ff6cefe..60156e7 100644 --- a/include/ui/Fence.h +++ b/include/ui/Fence.h @@ -25,6 +25,7 @@ #include <ui/Rect.h> #include <utils/Flattenable.h> #include <utils/String8.h> +#include <utils/Timers.h> struct ANativeWindowBuffer; @@ -40,6 +41,10 @@ class Fence public: static const sp<Fence> NO_FENCE; + // TIMEOUT_NEVER may be passed to the wait method to indicate that it + // should wait indefinitely for the fence to signal. + enum { TIMEOUT_NEVER = -1 }; + // Construct a new Fence object with an invalid file descriptor. This // should be done when the Fence object will be set up by unflattening // serialized data. @@ -65,13 +70,10 @@ public: // waitForever is a convenience function for waiting forever for a fence to // signal (just like wait(TIMEOUT_NEVER)), but issuing an error to the // system log and fence state to the kernel log if the wait lasts longer - // than warningTimeout. The logname argument should be a string identifying + // than a warning timeout. + // The logname argument should be a string identifying // the caller and will be included in the log message. - status_t waitForever(unsigned int warningTimeout, const char* logname); - - // TIMEOUT_NEVER may be passed to the wait method to indicate that it - // should wait indefinitely for the fence to signal. - enum { TIMEOUT_NEVER = -1 }; + status_t waitForever(const char* logname); // merge combines two Fence objects, creating a new Fence object that // becomes signaled when both f1 and f2 are signaled (even if f1 or f2 is @@ -85,6 +87,12 @@ public: // be returned and errno will indicate the problem. int dup() const; + // getSignalTime returns the system monotonic clock time at which the + // fence transitioned to the signaled state. If the fence is not signaled + // then INT64_MAX is returned. If the fence is invalid or if an error + // occurs then -1 is returned. + nsecs_t getSignalTime() const; + // Flattenable interface size_t getFlattenedSize() const; size_t getFdCount() const; |