Home
last modified time | relevance | path

Searched refs:nsecs_t (Results 1 – 25 of 396) sorted by relevance

12345678910>>...16

/frameworks/av/media/tests/benchmark/src/native/common/utils/
DTimers.h35 typedef int64_t nsecs_t; // nano-seconds typedef
37 static inline nsecs_t seconds_to_nanoseconds(nsecs_t secs) { in seconds_to_nanoseconds()
41 static inline nsecs_t milliseconds_to_nanoseconds(nsecs_t secs) { in milliseconds_to_nanoseconds()
45 static inline nsecs_t microseconds_to_nanoseconds(nsecs_t secs) { in microseconds_to_nanoseconds()
49 static inline nsecs_t nanoseconds_to_seconds(nsecs_t secs) { in nanoseconds_to_seconds()
53 static inline nsecs_t nanoseconds_to_milliseconds(nsecs_t secs) { in nanoseconds_to_milliseconds()
57 static inline nsecs_t nanoseconds_to_microseconds(nsecs_t secs) { in nanoseconds_to_microseconds()
61 static inline nsecs_t s2ns(nsecs_t v) { in s2ns()
64 static inline nsecs_t ms2ns(nsecs_t v) { in ms2ns()
67 static inline nsecs_t us2ns(nsecs_t v) { in us2ns()
[all …]
DTimers.cpp29 nsecs_t systemTime(int clock) { in systemTime()
35 return nsecs_t(t.tv_sec) * 1000000000LL + t.tv_nsec; in systemTime()
38 nsecs_t systemTime(int /*clock*/) { in systemTime()
45 return nsecs_t(t.tv_sec) * 1000000000LL + nsecs_t(t.tv_usec) * 1000LL; in systemTime()
49 int toMillisecondTimeoutDelay(nsecs_t referenceTime, nsecs_t timeoutTime) { in toMillisecondTimeoutDelay()
50 nsecs_t timeoutDelayMillis; in toMillisecondTimeoutDelay()
/frameworks/av/media/libstagefright/include/media/stagefright/
DVideoFrameSchedulerBase.h35 nsecs_t schedule(nsecs_t renderTime);
38 nsecs_t getVsyncPeriod();
46 static const nsecs_t kNanosIn1s = 1000000000;
47 static const nsecs_t kDefaultVsyncPeriod = kNanosIn1s / 60; // 60Hz
48 static const nsecs_t kVsyncRefreshPeriod = kNanosIn1s; // 1 sec
53 nsecs_t mVsyncTime; // vsync timing from display
54 nsecs_t mVsyncPeriod;
55 nsecs_t mVsyncRefreshAt; // next time to refresh timing info
66 nsecs_t addSample(nsecs_t time);
67 nsecs_t getPeriod() const;
[all …]
/frameworks/native/services/surfaceflinger/Scheduler/
DDispSync.h39 virtual void onDispSyncEvent(nsecs_t when) = 0;
52 virtual bool addResyncSample(nsecs_t timestamp, bool* periodFlushed) = 0;
54 virtual void setPeriod(nsecs_t period) = 0;
55 virtual nsecs_t getPeriod() = 0;
57 virtual status_t addEventListener(const char* name, nsecs_t phase, Callback* callback,
58 nsecs_t lastCallbackTime) = 0;
59 virtual status_t removeEventListener(Callback* callback, nsecs_t* outLastCallback) = 0;
60 virtual status_t changePhaseOffset(Callback* callback, nsecs_t phase) = 0;
61 virtual nsecs_t computeNextRefresh(int periodOffset) const = 0;
63 virtual nsecs_t expectedPresentTime() = 0;
[all …]
DDispSync.cpp58 static const nsecs_t kErrorThreshold = 160000000000; // 400 usec squared
77 void updateModel(nsecs_t period, nsecs_t phase, nsecs_t referenceTime) { in updateModel()
87 const nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in updateModel()
88 const nsecs_t baseTime = now - mReferenceTime; in updateModel()
89 const nsecs_t numOldPeriods = baseTime / mPeriod; in updateModel()
135 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in threadLoop()
140 nsecs_t targetTime = 0; in threadLoop()
190 static const nsecs_t kMaxWakeupLatency = us2ns(1500); in threadLoop()
212 status_t addEventListener(const char* name, nsecs_t phase, DispSync::Callback* callback, in addEventListener()
213 nsecs_t lastCallbackTime) { in addEventListener()
[all …]
DLayerInfo.h47 explicit RefreshRateHistory(nsecs_t minRefreshDuration) in RefreshRateHistory()
67 std::deque<nsecs_t> mElements;
69 const nsecs_t mMinRefreshDuration;
79 void insertPresentTime(nsecs_t presentTime) { in insertPresentTime()
132 std::deque<nsecs_t> mElements;
147 void setLastPresentTime(nsecs_t lastPresentTime);
187 nsecs_t getLastUpdatedTime() { in getLastUpdatedTime()
202 const nsecs_t mMinRefreshDuration;
203 const nsecs_t mLowActivityRefreshDuration;
205 nsecs_t mLastUpdatedTime GUARDED_BY(mLock) = 0;
[all …]
DDispSyncSource.h28 DispSyncSource(DispSync* dispSync, nsecs_t phaseOffset, nsecs_t offsetThresholdForNextVsync,
36 void setPhaseOffset(nsecs_t phaseOffset) override;
40 virtual void onDispSyncEvent(nsecs_t when);
52 nsecs_t mLastCallbackTime GUARDED_BY(mVsyncMutex) = 0;
60 nsecs_t mPhaseOffset GUARDED_BY(mVsyncMutex);
61 const nsecs_t mOffsetThresholdForNextVsync;
DPhaseOffsets.h44 virtual nsecs_t getCurrentAppOffset() = 0;
45 virtual nsecs_t getCurrentSfOffset() = 0;
50 virtual nsecs_t getOffsetThresholdForNextVsync() const = 0;
59 nsecs_t getCurrentAppOffset() override;
60 nsecs_t getCurrentSfOffset() override;
77 nsecs_t getOffsetThresholdForNextVsync() const override { return mOffsetThresholdForNextVsync; } in getOffsetThresholdForNextVsync()
87 nsecs_t mOffsetThresholdForNextVsync;
DScheduler.h88 sp<ConnectionHandle> createConnection(const char* connectionName, nsecs_t phaseOffsetNs,
89 nsecs_t offsetThresholdForNextVsync,
121 void setPhaseOffset(const sp<ConnectionHandle>& handle, nsecs_t phaseOffset);
132 void resyncToHardwareVsync(bool makeAvailable, nsecs_t period);
137 void addResyncSample(const nsecs_t timestamp, bool* periodFlushed);
140 nsecs_t getDispSyncExpectedPresentTime();
148 nsecs_t presentTime, bool isHDR);
177 const char* connectionName, DispSync* dispSync, nsecs_t phaseOffsetNs,
178 nsecs_t offsetThresholdForNextVsync,
195 nsecs_t calculateAverage() const;
[all …]
/frameworks/native/libs/gui/include/gui/
DFrameTimestamps.h56 static constexpr nsecs_t TIMESTAMP_PENDING = -2;
58 static inline bool isValidTimestamp(nsecs_t time) { in isValidTimestamp()
86 nsecs_t postedTime{TIMESTAMP_PENDING};
87 nsecs_t requestedPresentTime{TIMESTAMP_PENDING};
88 nsecs_t latchTime{TIMESTAMP_PENDING};
89 nsecs_t firstRefreshStartTime{TIMESTAMP_PENDING};
90 nsecs_t lastRefreshStartTime{TIMESTAMP_PENDING};
91 nsecs_t dequeueReadyTime{TIMESTAMP_PENDING};
100 nsecs_t deadline{0};
101 nsecs_t interval{16666667};
[all …]
DSurface.h142 status_t setDequeueTimeout(nsecs_t timeout);
149 bool waitForNextFrame(uint64_t lastFrame, nsecs_t timeout);
156 status_t getDisplayRefreshCycleDuration(nsecs_t* outRefreshDuration);
165 nsecs_t* compositeDeadline, nsecs_t* compositeInterval,
166 nsecs_t* compositeToPresentLatency);
170 nsecs_t* outRequestedPresentTime, nsecs_t* outAcquireTime,
171 nsecs_t* outLatchTime, nsecs_t* outFirstRefreshStartTime,
172 nsecs_t* outLastRefreshStartTime, nsecs_t* outGlCompositionDoneTime,
173 nsecs_t* outDisplayPresentTime, nsecs_t* outDequeueReadyTime,
174 nsecs_t* outReleaseTime);
[all …]
/frameworks/av/media/tests/benchmark/src/native/common/
DStats.h64 nsecs_t mInitTimeNs;
65 nsecs_t mDeInitTimeNs;
66 nsecs_t mStartTimeNs;
68 std::vector<nsecs_t> mInputTimer;
69 std::vector<nsecs_t> mOutputTimer;
72 nsecs_t getCurTime() { return systemTime(CLOCK_MONOTONIC); } in getCurTime()
74 void setInitTime(nsecs_t initTime) { mInitTimeNs = initTime; } in setInitTime()
76 void setDeInitTime(nsecs_t deInitTime) { mDeInitTimeNs = deInitTime; } in setDeInitTime()
92 std::vector<nsecs_t> getOutputTimer() { return mOutputTimer; } in getOutputTimer()
94 nsecs_t getInitTime() { return mInitTimeNs; } in getInitTime()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/mock/
DMockDispSync.h34 MOCK_METHOD2(addResyncSample, bool(nsecs_t, bool*));
36 MOCK_METHOD1(setPeriod, void(nsecs_t));
37 MOCK_METHOD0(getPeriod, nsecs_t());
38 MOCK_METHOD0(getIntendedPeriod, nsecs_t());
40 MOCK_CONST_METHOD1(computeNextRefresh, nsecs_t(int));
42 MOCK_METHOD0(expectedPresentTime, nsecs_t());
46 status_t addEventListener(const char* name, nsecs_t phase, Callback* callback,
47 nsecs_t lastCallbackTime) override;
48 status_t removeEventListener(Callback* callback, nsecs_t* outLastCallback) override;
49 status_t changePhaseOffset(Callback* callback, nsecs_t phase) override;
[all …]
/frameworks/av/media/libstagefright/
DVideoFrameSchedulerBase.cpp54 static const nsecs_t kMaxAllowedFrameSkip = VideoFrameSchedulerBase::kNanosIn1s; // 1 sec
55 static const nsecs_t kMinPeriod = VideoFrameSchedulerBase::kNanosIn1s / 120; // 120Hz
56 static const nsecs_t kRefitRefreshPeriod = 10 * VideoFrameSchedulerBase::kNanosIn1s; // 10 sec
79 mPeriod = (nsecs_t)(1e9 / fps + 0.5); in reset()
95 nsecs_t period = VideoFrameSchedulerBase::kNanosIn1s / 60;
123 nsecs_t phase, nsecs_t period, size_t numSamplesToUse, in fit()
141 nsecs_t lastTime; in fit()
144 nsecs_t time = mTimes[ix]; in fit()
188 Vector<nsecs_t> deltas; in prime()
189 nsecs_t lastTime, firstTime; in prime()
[all …]
/frameworks/native/services/surfaceflinger/TimeStats/
DTimeStats.h51 nsecs_t postTime) = 0;
52 virtual void setLatchTime(int32_t layerID, uint64_t frameNumber, nsecs_t latchTime) = 0;
53 virtual void setDesiredTime(int32_t layerID, uint64_t frameNumber, nsecs_t desiredTime) = 0;
54 virtual void setAcquireTime(int32_t layerID, uint64_t frameNumber, nsecs_t acquireTime) = 0;
57 virtual void setPresentTime(int32_t layerID, uint64_t frameNumber, nsecs_t presentTime) = 0;
67 virtual void recordRefreshRate(uint32_t fps, nsecs_t duration) = 0;
76 nsecs_t postTime = 0;
77 nsecs_t latchTime = 0;
78 nsecs_t acquireTime = 0;
79 nsecs_t desiredTime = 0;
[all …]
/frameworks/native/services/inputflinger/reader/mapper/
DTouchInputMapper.h46 nsecs_t lastReportTime;
83 inline void reset(nsecs_t when) { in reset()
203 virtual void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes);
204 virtual void reset(nsecs_t when);
213 virtual void cancelTouch(nsecs_t when);
214 virtual void timeoutExpired(nsecs_t when);
360 nsecs_t when;
431 nsecs_t mExternalStylusFusionTimeout;
444 nsecs_t mDownTime;
455 virtual void configureSurface(nsecs_t when, bool* outResetNeeded);
[all …]
/frameworks/native/include/input/
DVelocityTracker.h41 nsecs_t time;
83 void addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions);
107 nsecs_t mLastEventTime;
130 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
162 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
170 static const nsecs_t HORIZON = 100 * 1000000; // 100 ms
176 nsecs_t eventTime;
205 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
212 nsecs_t updateTime;
223 void initState(State& state, nsecs_t eventTime, float xpos, float ypos) const;
[all …]
/frameworks/base/libs/hwui/renderthread/
DTimeLord.h31 void setFrameInterval(nsecs_t intervalNanos) { mFrameIntervalNanos = intervalNanos; } in setFrameInterval()
32 nsecs_t frameIntervalNanos() const { return mFrameIntervalNanos; } in frameIntervalNanos()
35 bool vsyncReceived(nsecs_t vsync);
36 nsecs_t latestVsync() { return mFrameTimeNanos; } in latestVsync()
37 nsecs_t computeFrameTimeNanos();
45 nsecs_t mFrameIntervalNanos;
46 nsecs_t mFrameTimeNanos;
/frameworks/native/services/inputflinger/dispatcher/
DInputDispatcher.h144 void dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) REQUIRES(mLock);
157 nsecs_t mAppSwitchDueTime GUARDED_BY(mLock);
164 static bool isStaleEvent(nsecs_t currentTime, EventEntry* entry);
212 nsecs_t nextRepeatTime;
216 KeyEntry* synthesizeKeyRepeatLocked(nsecs_t currentTime) REQUIRES(mLock);
282 bool dispatchConfigurationChangedLocked(nsecs_t currentTime, ConfigurationChangedEntry* entry)
284 bool dispatchDeviceResetLocked(nsecs_t currentTime, DeviceResetEntry* entry) REQUIRES(mLock);
285 bool dispatchKeyLocked(nsecs_t currentTime, KeyEntry* entry, DropReason* dropReason,
286 nsecs_t* nextWakeupTime) REQUIRES(mLock);
287 bool dispatchMotionLocked(nsecs_t currentTime, MotionEntry* entry, DropReason* dropReason,
[all …]
DEntry.h47 nsecs_t eventTime;
60 EventEntry(uint32_t sequenceNum, int32_t type, nsecs_t eventTime, uint32_t policyFlags);
66 explicit ConfigurationChangedEntry(uint32_t sequenceNum, nsecs_t eventTime);
76 DeviceResetEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId);
93 nsecs_t downTime;
104 nsecs_t interceptKeyWakeupTime; // used with INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER
106 KeyEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
109 nsecs_t downTime);
118 nsecs_t eventTime;
131 nsecs_t downTime;
[all …]
/frameworks/native/services/surfaceflinger/
DFrameTracker.h54 void setDesiredPresentTime(nsecs_t desiredPresentTime);
60 void setFrameReadyTime(nsecs_t readyTime);
68 void setActualPresentTime(nsecs_t displayTime);
77 void setDisplayRefreshPeriod(nsecs_t displayPeriod);
101 nsecs_t desiredPresentTime;
102 nsecs_t frameReadyTime;
103 nsecs_t actualPresentTime;
157 nsecs_t mDisplayPeriod;
/frameworks/base/libs/hwui/
DPropertyValuesAnimatorSet.h28 PropertyAnimator(PropertyValuesHolder* holder, Interpolator* interpolator, nsecs_t startDelay,
29 nsecs_t duration, int repeatCount, RepeatMode repeatMode);
30 void setCurrentPlayTime(nsecs_t playTime);
31 nsecs_t getTotalDuration() { return mTotalDuration; } in getTotalDuration()
38 nsecs_t mStartDelay;
39 nsecs_t mDuration;
41 nsecs_t mTotalDuration;
58 Interpolator* interpolators, int64_t startDelays, nsecs_t durations,
71 virtual void onPlayTimeChanged(nsecs_t playTime) override;
DJankTracker.cpp42 std::function<int64_t(nsecs_t)> computeThreadshold;
48 Comparison{JankType::kMissedVsync, [](nsecs_t) { return 1; }, FrameInfoIndex::IntendedVsync, in __anond0ea453f0102()
52 [](nsecs_t frameInterval) { return static_cast<int64_t>(.5 * frameInterval); }, in __anond0ea453f0202()
56 [](nsecs_t frameInterval) { return static_cast<int64_t>(.2 * frameInterval); }, in __anond0ea453f0302()
60 [](nsecs_t frameInterval) { return static_cast<int64_t>(.75 * frameInterval); }, in __anond0ea453f0402()
84 nsecs_t frameIntervalNanos = static_cast<nsecs_t>(1_s / displayInfo.fps); in JankTracker()
85 nsecs_t sfOffset = frameIntervalNanos - (displayInfo.presentationDeadline - 1_ms); in JankTracker()
86 nsecs_t offsetDelta = sfOffset - displayInfo.appVsyncOffset; in JankTracker()
101 void JankTracker::setFrameInterval(nsecs_t frameInterval) { in setFrameInterval()
113 nsecs_t expectedDequeueDuration = mDequeueTimeForgiveness + frame[FrameInfoIndex::Vsync] - in finishFrame()
[all …]
/frameworks/native/services/inputflinger/reader/include/
DInputReader.h76 virtual void vibrate(int32_t deviceId, const nsecs_t* pattern, size_t patternSize,
95 virtual void disableVirtualKeysUntil(nsecs_t time);
96 virtual bool shouldDropVirtualKey(nsecs_t now, InputDevice* device, int32_t keyCode,
99 virtual void requestTimeoutAtTime(nsecs_t when);
134 void addDeviceLocked(nsecs_t when, int32_t deviceId);
135 void removeDeviceLocked(nsecs_t when, int32_t deviceId);
137 void timeoutExpiredLocked(nsecs_t when);
139 void handleConfigurationChangedLocked(nsecs_t when);
156 nsecs_t mDisableVirtualKeysTimeout;
157 void disableVirtualKeysUntilLocked(nsecs_t time);
[all …]
/frameworks/base/native/android/
Dchoreographer.cpp42 nsecs_t dueTime;
55 AChoreographer_frameCallback64 cb64, void* data, nsecs_t delay);
72 void dispatchVsync(nsecs_t timestamp, PhysicalDisplayId displayId, uint32_t count) override;
73 void dispatchHotplug(nsecs_t timestamp, PhysicalDisplayId displayId, bool connected) override;
74 void dispatchConfigChanged(nsecs_t timestamp, PhysicalDisplayId displayId,
112 … AChoreographer_frameCallback cb, AChoreographer_frameCallback64 cb64, void* data, nsecs_t delay) { in postFrameCallbackDelayed()
113 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in postFrameCallbackDelayed()
134 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in scheduleCallbacks()
145 void Choreographer::dispatchVsync(nsecs_t timestamp, PhysicalDisplayId, uint32_t) { in dispatchVsync()
149 nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); in dispatchVsync()
[all …]

12345678910>>...16