Home
last modified time | relevance | path

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

12345678910>>...22

/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/native/services/surfaceflinger/Scheduler/
DVsyncConfiguration.h88 virtual VsyncConfiguration::VsyncConfigSet constructOffsets(nsecs_t vsyncDuration) const = 0;
107 PhaseOffsets(Fps currentRefreshRate, nsecs_t vsyncPhaseOffsetNs, nsecs_t sfVSyncPhaseOffsetNs,
108 std::optional<nsecs_t> earlySfOffsetNs, std::optional<nsecs_t> earlyGpuSfOffsetNs,
109 std::optional<nsecs_t> earlyAppOffsetNs,
110 std::optional<nsecs_t> earlyGpuAppOffsetNs, nsecs_t highFpsVsyncPhaseOffsetNs,
111 nsecs_t highFpsSfVSyncPhaseOffsetNs, std::optional<nsecs_t> highFpsEarlySfOffsetNs,
112 std::optional<nsecs_t> highFpsEarlyGpuSfOffsetNs,
113 std::optional<nsecs_t> highFpsEarlyAppOffsetNs,
114 std::optional<nsecs_t> highFpsEarlyGpuAppOffsetNs, nsecs_t thresholdForNextVsync,
115 nsecs_t hwcMinWorkDuration);
[all …]
DVSyncDispatchTimerQueue.h44 nsecs_t minVsyncDistance);
49 std::optional<nsecs_t> lastExecutedVsyncTarget() const;
52 ScheduleResult schedule(VSyncDispatch::ScheduleTiming, VSyncTracker&, nsecs_t now);
54 void update(VSyncTracker&, nsecs_t now);
58 std::optional<nsecs_t> wakeupTime() const;
60 std::optional<nsecs_t> readyTime() const;
62 std::optional<nsecs_t> targetVsync() const;
69 nsecs_t executing();
80 void callback(nsecs_t vsyncTimestamp, nsecs_t wakeupTimestamp, nsecs_t deadlineTimestamp);
91 const nsecs_t mMinVsyncDistance;
[all …]
DVSyncPredictor.h38 VSyncPredictor(nsecs_t idealPeriod, size_t historySize, size_t minimumSamplesForPrediction,
42 bool addVsyncTimestamp(nsecs_t timestamp) final EXCLUDES(mMutex);
43 nsecs_t nextAnticipatedVSyncTimeFrom(nsecs_t timePoint) const final EXCLUDES(mMutex);
44 nsecs_t currentPeriod() const final EXCLUDES(mMutex);
54 void setPeriod(nsecs_t period) final EXCLUDES(mMutex);
62 nsecs_t slope;
63 nsecs_t intercept;
68 bool isVSyncInPhase(nsecs_t timePoint, Fps frameRate) const final EXCLUDES(mMutex);
86 bool validate(nsecs_t timestamp) const REQUIRES(mMutex);
90 nsecs_t nextAnticipatedVSyncTimeFromLocked(nsecs_t timePoint) const REQUIRES(mMutex);
[all …]
DVsyncConfiguration.cpp32 std::optional<nsecs_t> getProperty(const char* name) { in getProperty()
107 .value_or(std::numeric_limits<nsecs_t>::max()), in PhaseOffsets()
110 PhaseOffsets::PhaseOffsets(Fps currentFps, nsecs_t vsyncPhaseOffsetNs, nsecs_t sfVSyncPhaseOffsetNs, in PhaseOffsets()
111 std::optional<nsecs_t> earlySfOffsetNs, in PhaseOffsets()
112 std::optional<nsecs_t> earlyGpuSfOffsetNs, in PhaseOffsets()
113 std::optional<nsecs_t> earlyAppOffsetNs, in PhaseOffsets()
114 std::optional<nsecs_t> earlyGpuAppOffsetNs, in PhaseOffsets()
115 nsecs_t highFpsVsyncPhaseOffsetNs, nsecs_t highFpsSfVSyncPhaseOffsetNs, in PhaseOffsets()
116 std::optional<nsecs_t> highFpsEarlySfOffsetNs, in PhaseOffsets()
117 std::optional<nsecs_t> highFpsEarlyGpuSfOffsetNs, in PhaseOffsets()
[all …]
DLayerInfo.h45 constexpr nsecs_t getActiveLayerThreshold(nsecs_t now) { in getActiveLayerThreshold()
144 void setLastPresentTime(nsecs_t lastPresentTime, nsecs_t now, LayerUpdateType updateType,
163 LayerVote getRefreshRateVote(const RefreshRateConfigs&, nsecs_t now);
167 nsecs_t getLastUpdatedTime() const { return mLastUpdatedTime; } in getLastUpdatedTime()
181 Fps getFps(nsecs_t now) const;
183 void onLayerInactive(nsecs_t now) { in onLayerInactive()
194 void clearHistory(nsecs_t now) { in clearHistory()
202 nsecs_t presentTime; // desiredPresentTime, if provided
203 nsecs_t queueTime; // buffer queue time
231 bool add(Fps refreshRate, nsecs_t now);
[all …]
DVSyncPredictor.cpp48 VSyncPredictor::VSyncPredictor(nsecs_t idealPeriod, size_t historySize, in VSyncPredictor()
68 bool VSyncPredictor::validate(nsecs_t timestamp) const { in validate()
81 [timestamp](nsecs_t a, nsecs_t b) { in validate()
92 nsecs_t VSyncPredictor::currentPeriod() const { in currentPeriod()
97 bool VSyncPredictor::addVsyncTimestamp(nsecs_t timestamp) { in addVsyncTimestamp()
148 std::vector<nsecs_t> vsyncTS(numSamples); in addVsyncTimestamp()
149 std::vector<nsecs_t> ordinals(numSamples); in addVsyncTimestamp()
160 nsecs_t meanTS = 0; in addVsyncTimestamp()
161 nsecs_t meanOrdinal = 0; in addVsyncTimestamp()
183 nsecs_t top = 0; in addVsyncTimestamp()
[all …]
/frameworks/native/services/surfaceflinger/DisplayHardware/
DPowerAdvisor.h56 virtual void setTargetWorkDuration(nsecs_t targetDuration) = 0;
68 virtual void setHwcValidateTiming(DisplayId displayId, nsecs_t validateStartTime,
69 nsecs_t validateEndTime) = 0;
71 virtual void setHwcPresentTiming(DisplayId displayId, nsecs_t presentStartTime,
72 nsecs_t presentEndTime) = 0;
74 virtual void setExpectedPresentTime(nsecs_t expectedPresentTime) = 0;
76 virtual void setSfPresentTiming(nsecs_t presentFenceTime, nsecs_t presentEndTime) = 0;
86 virtual void setFrameDelay(nsecs_t frameDelayDuration) = 0;
88 virtual void setCommitStart(nsecs_t commitStartTime) = 0;
90 virtual void setCompositeEnd(nsecs_t compositeEndTime) = 0;
[all …]
/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/inputflinger/dispatcher/
DInputEventTimeline.h42 nsecs_t deliveryTime; // time at which the event was sent to the receiver
43 nsecs_t consumeTime; // time at which the receiver read the event
44 nsecs_t finishTime; // time at which the finish event was received
46 std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline;
48 ConnectionTimeline(nsecs_t deliveryTime, nsecs_t consumeTime, nsecs_t finishTime);
49 ConnectionTimeline(std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline);
60 bool setDispatchTimeline(nsecs_t deliveryTime, nsecs_t consumeTime, nsecs_t finishTime);
66 bool setGraphicsTimeline(std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline);
77 InputEventTimeline(bool isDown, nsecs_t eventTime, nsecs_t readTime);
79 const nsecs_t eventTime;
[all …]
DLatencyTracker.h53 void trackListener(int32_t inputEventId, bool isDown, nsecs_t eventTime, nsecs_t readTime);
55 nsecs_t deliveryTime, nsecs_t consumeTime, nsecs_t finishTime);
57 std::array<nsecs_t, GraphicsTimeline::SIZE> timeline);
77 std::multimap<nsecs_t /*eventTime*/, int32_t /*inputEventId*/> mEventTimes;
80 void reportAndPruneMatureRecords(nsecs_t newEventTime);
DEntry.h49 nsecs_t eventTime;
74 EventEntry(int32_t id, Type type, nsecs_t eventTime, uint32_t policyFlags);
82 explicit ConfigurationChangedEntry(int32_t id, nsecs_t eventTime);
91 DeviceResetEntry(int32_t id, nsecs_t eventTime, int32_t deviceId);
102 FocusEntry(int32_t id, nsecs_t eventTime, sp<IBinder> connectionToken, bool hasFocus,
112 PointerCaptureChangedEntry(int32_t id, nsecs_t eventTime, const PointerCaptureRequest&);
123 DragEntry(int32_t id, nsecs_t eventTime, sp<IBinder> connectionToken, bool isExiting, float x,
140 nsecs_t downTime;
151 nsecs_t interceptKeyWakeupTime; // used with INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER
153 KeyEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source, int32_t displayId,
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DVSyncDispatchRealtimeTest.cpp33 constexpr nsecs_t toNs(std::chrono::duration<Rep, Per> const& tp) { in toNs()
41 bool addVsyncTimestamp(nsecs_t) final { return true; } in addVsyncTimestamp() argument
43 nsecs_t nextAnticipatedVSyncTimeFrom(nsecs_t timePoint) const final { in nextAnticipatedVSyncTimeFrom()
51 nsecs_t currentPeriod() const final { return mPeriod; } in currentPeriod()
53 void setPeriod(nsecs_t) final {} in setPeriod() argument
56 bool isVSyncInPhase(nsecs_t, Fps) const final { return false; } in isVSyncInPhase() argument
60 nsecs_t const mPeriod;
65 VRRStubTracker(nsecs_t period) : mPeriod{period} {} in VRRStubTracker()
67 bool addVsyncTimestamp(nsecs_t) final { return true; } in addVsyncTimestamp() argument
69 nsecs_t nextAnticipatedVSyncTimeFrom(nsecs_t time_point) const final { in nextAnticipatedVSyncTimeFrom()
[all …]
DPowerAdvisorTest.cpp42 void fakeBasicFrameTiming(nsecs_t startTime, nsecs_t vsyncPeriod);
43 void setExpectedTiming(nsecs_t startTime, nsecs_t vsyncPeriod);
44 nsecs_t getFenceWaitDelayDuration(bool skipValidate);
50 nsecs_t kErrorMargin = std::chrono::nanoseconds(1ms).count();
70 void PowerAdvisorTest::setExpectedTiming(nsecs_t totalFrameTarget, nsecs_t expectedPresentTime) { in setExpectedTiming()
75 void PowerAdvisorTest::fakeBasicFrameTiming(nsecs_t startTime, nsecs_t vsyncPeriod) { in fakeBasicFrameTiming()
81 nsecs_t PowerAdvisorTest::getFenceWaitDelayDuration(bool skipValidate) { in getFenceWaitDelayDuration()
96 const nsecs_t vsyncPeriod = std::chrono::nanoseconds(1s).count() / 60; in TEST_F()
97 const nsecs_t presentDuration = std::chrono::nanoseconds(5ms).count(); in TEST_F()
98 const nsecs_t postCompDuration = std::chrono::nanoseconds(1ms).count(); in TEST_F()
[all …]
/frameworks/native/services/inputflinger/reader/mapper/
DTouchInputMapper.h144 void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) override;
145 void reset(nsecs_t when) override;
153 void cancelTouch(nsecs_t when, nsecs_t readTime) override;
154 void timeoutExpired(nsecs_t when) override;
318 nsecs_t when;
319 nsecs_t readTime;
388 nsecs_t mExternalStylusFusionTimeout;
401 nsecs_t mDownTime;
412 virtual void configureInputDevice(nsecs_t when, bool* outResetNeeded);
425 virtual void syncTouch(nsecs_t when, RawState* outState) = 0;
[all …]
/frameworks/native/services/surfaceflinger/FrameTimeline/
DFrameTimeline.h87 TimelineItem(const nsecs_t startTime = 0, const nsecs_t endTime = 0,
88 const nsecs_t presentTime = 0)
91 nsecs_t startTime;
92 nsecs_t endTime;
93 nsecs_t presentTime;
106 nsecs_t presentThreshold = std::chrono::duration_cast<std::chrono::nanoseconds>(2ms).count();
107 nsecs_t deadlineThreshold = std::chrono::duration_cast<std::chrono::nanoseconds>(0ms).count();
108 nsecs_t startThreshold = std::chrono::duration_cast<std::chrono::nanoseconds>(2ms).count();
180 void setActualStartTime(nsecs_t actualStartTime);
181 void setActualQueueTime(nsecs_t actualQueueTime);
[all …]
/frameworks/av/services/camera/libcameraservice/device3/
DPreviewFrameSpacer.h56 status_t queuePreviewBuffer(nsecs_t timestamp, nsecs_t readoutTimestamp,
65 nsecs_t timestamp;
66 nsecs_t readoutTimestamp;
71 BufferHolder(nsecs_t t, nsecs_t readoutT, int32_t tr, ANativeWindowBuffer* anwb, int rf) : in BufferHolder()
76 void queueBufferToClientLocked(const BufferHolder& bufferHolder, nsecs_t currentTime);
84 nsecs_t mLastCameraReadoutTime = 0;
85 nsecs_t mLastCameraPresentTime = 0;
86 static constexpr nsecs_t kWaitDuration = 5000000LL; // 50ms
87 static constexpr nsecs_t kFrameIntervalThreshold = 80000000LL; // 80ms
88 static constexpr nsecs_t kMaxFrameWaitTime = 10000000LL; // 10ms
[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/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 …]
/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, nsecs_t indendedVsync, int64_t vsyncId,
36 int64_t frameDeadline, nsecs_t frameInterval);
37 nsecs_t latestVsync() { return mFrameTimeNanos; } in latestVsync()
38 nsecs_t computeFrameTimeNanos();
48 nsecs_t mFrameIntervalNanos;
49 nsecs_t mFrameTimeNanos;
50 nsecs_t mFrameIntendedTimeNanos;
/frameworks/native/services/surfaceflinger/fuzzer/
Dsurfaceflinger_scheduler_fuzzer.h39 nsecs_t now() const { return 1; } in now()
46 nsecs_t now() const { return mClock->now(); } in now()
100 FuzzImplVSyncTracker(nsecs_t period) { mPeriod = period; } in FuzzImplVSyncTracker()
104 bool addVsyncTimestamp(nsecs_t /* timestamp */) override { return true; } in addVsyncTimestamp() argument
106 nsecs_t nextAnticipatedVSyncTimeFrom(nsecs_t /* timePoint */) const override { return 1; } in nextAnticipatedVSyncTimeFrom() argument
108 nsecs_t currentPeriod() const override { return 1; } in currentPeriod()
110 void setPeriod(nsecs_t /* period */) override {} in setPeriod() argument
116 bool isVSyncInPhase(nsecs_t /* timePoint */, Fps /* frameRate */) const override { in isVSyncInPhase() argument
120 nsecs_t nextVSyncTime(nsecs_t timePoint) const { in nextVSyncTime()
130 nsecs_t mPeriod;
[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.h67 virtual void recordFrameDuration(nsecs_t startTime, nsecs_t endTime) = 0;
71 virtual void recordRenderEngineDuration(nsecs_t startTime, nsecs_t endTime) = 0;
73 virtual void recordRenderEngineDuration(nsecs_t startTime,
77 uid_t uid, nsecs_t postTime, GameMode) = 0;
78 virtual void setLatchTime(int32_t layerId, uint64_t frameNumber, nsecs_t latchTime) = 0;
91 virtual void setDesiredTime(int32_t layerId, uint64_t frameNumber, nsecs_t desiredTime) = 0;
92 virtual void setAcquireTime(int32_t layerId, uint64_t frameNumber, nsecs_t acquireTime) = 0;
97 virtual void setPresentTime(int32_t layerId, uint64_t frameNumber, nsecs_t presentTime,
123 nsecs_t displayDeadlineDelta = 0;
124 nsecs_t displayPresentJitter = 0;
[all …]
/frameworks/native/services/inputflinger/tests/fuzzers/
DLatencyTrackerFuzzer.cpp66 nsecs_t eventTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
67 nsecs_t readTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
73 nsecs_t deliveryTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
74 nsecs_t consumeTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
75 nsecs_t finishTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
82 std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline; in LLVMFuzzerTestOneInput()
84 graphicsTimeline[i] = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()

12345678910>>...22