Home
last modified time | relevance | path

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

12345678910>>...25

/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.h86 virtual VsyncConfigSet constructOffsets(nsecs_t vsyncDuration) const = 0;
105 PhaseOffsets(Fps currentRefreshRate, nsecs_t vsyncPhaseOffsetNs, nsecs_t sfVSyncPhaseOffsetNs,
106 std::optional<nsecs_t> earlySfOffsetNs, std::optional<nsecs_t> earlyGpuSfOffsetNs,
107 std::optional<nsecs_t> earlyAppOffsetNs,
108 std::optional<nsecs_t> earlyGpuAppOffsetNs, nsecs_t highFpsVsyncPhaseOffsetNs,
109 nsecs_t highFpsSfVSyncPhaseOffsetNs, std::optional<nsecs_t> highFpsEarlySfOffsetNs,
110 std::optional<nsecs_t> highFpsEarlyGpuSfOffsetNs,
111 std::optional<nsecs_t> highFpsEarlyAppOffsetNs,
112 std::optional<nsecs_t> highFpsEarlyGpuAppOffsetNs, nsecs_t thresholdForNextVsync,
113 nsecs_t hwcMinWorkDuration);
[all …]
DVSyncDispatchTimerQueue.h43 nsecs_t minVsyncDistance);
48 std::optional<nsecs_t> lastExecutedVsyncTarget() const;
51 ScheduleResult schedule(VSyncDispatch::ScheduleTiming, VSyncTracker&, nsecs_t now);
53 void update(VSyncTracker&, nsecs_t now);
57 std::optional<nsecs_t> wakeupTime() const;
59 std::optional<nsecs_t> readyTime() const;
61 std::optional<nsecs_t> targetVsync() const;
68 nsecs_t executing();
72 ScheduleResult addPendingWorkloadUpdate(VSyncTracker&, nsecs_t now,
80 void callback(nsecs_t vsyncTimestamp, nsecs_t wakeupTimestamp, nsecs_t deadlineTimestamp);
[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 …]
DVSyncPredictor.h47 bool addVsyncTimestamp(nsecs_t timestamp) final EXCLUDES(mMutex);
48 nsecs_t nextAnticipatedVSyncTimeFrom(nsecs_t timePoint,
49 std::optional<nsecs_t> lastVsyncOpt = {}) final
51 nsecs_t currentPeriod() const final EXCLUDES(mMutex);
61 nsecs_t slope;
62 nsecs_t intercept;
67 bool isVSyncInPhase(nsecs_t timePoint, Fps frameRate) final EXCLUDES(mMutex);
88 nsecs_t vsyncTime;
101 Model model, std::optional<Period> minFramePeriodOpt, nsecs_t vsyncTime,
102 MissedVsync lastMissedVsync, std::optional<nsecs_t> lastVsyncOpt = {});
[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/reader/mapper/gestures/
DGestureConverter.h52 [[nodiscard]] std::list<NotifyArgs> reset(nsecs_t when);
60 [[nodiscard]] std::list<NotifyArgs> handleGesture(nsecs_t when, nsecs_t readTime,
61 nsecs_t gestureStartTime,
65 [[nodiscard]] std::list<NotifyArgs> handleMove(nsecs_t when, nsecs_t readTime,
66 nsecs_t gestureStartTime,
68 [[nodiscard]] std::list<NotifyArgs> handleButtonsChange(nsecs_t when, nsecs_t readTime,
70 [[nodiscard]] std::list<NotifyArgs> releaseAllButtons(nsecs_t when, nsecs_t readTime);
71 [[nodiscard]] std::list<NotifyArgs> handleScroll(nsecs_t when, nsecs_t readTime,
73 [[nodiscard]] std::list<NotifyArgs> handleFling(nsecs_t when, nsecs_t readTime,
74 nsecs_t gestureStartTime,
[all …]
/frameworks/native/services/inputflinger/dispatcher/
DInputEventTimeline.h43 nsecs_t deliveryTime; // time at which the event was sent to the receiver
44 nsecs_t consumeTime; // time at which the receiver read the event
45 nsecs_t finishTime; // time at which the finish event was received
47 std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline;
49 ConnectionTimeline(nsecs_t deliveryTime, nsecs_t consumeTime, nsecs_t finishTime);
50 ConnectionTimeline(std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline);
61 bool setDispatchTimeline(nsecs_t deliveryTime, nsecs_t consumeTime, nsecs_t finishTime);
67 bool setGraphicsTimeline(std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline);
78 InputEventTimeline(bool isDown, nsecs_t eventTime, nsecs_t readTime, uint16_t vendorId,
81 const nsecs_t eventTime;
[all …]
/frameworks/native/services/inputflinger/reader/mapper/
DTouchInputMapper.h55 static constexpr nsecs_t EXTERNAL_STYLUS_DATA_TIMEOUT = ms2ns(72);
58 static constexpr nsecs_t TOUCH_DATA_TIMEOUT = ms2ns(20);
173 [[nodiscard]] std::list<NotifyArgs> reconfigure(nsecs_t when,
176 [[nodiscard]] std::list<NotifyArgs> reset(nsecs_t when) override;
184 [[nodiscard]] std::list<NotifyArgs> cancelTouch(nsecs_t when, nsecs_t readTime) override;
185 [[nodiscard]] std::list<NotifyArgs> timeoutExpired(nsecs_t when) override;
333 nsecs_t when{std::numeric_limits<nsecs_t>::min()};
334 nsecs_t readTime{};
374 nsecs_t mExternalStylusFusionTimeout;
391 nsecs_t mDownTime{0};
[all …]
DTouchCursorInputMapperCommon.cpp30 InputReaderContext* context, int32_t action, nsecs_t when, nsecs_t readTime, in synthesizeButtonKey()
90 InputReaderContext* context, int32_t action, nsecs_t when, nsecs_t readTime, in synthesizeButtonKeys()
103 std::tuple<nsecs_t /*eventTime*/, nsecs_t /*readTime*/> applyBluetoothTimestampSmoothening( in applyBluetoothTimestampSmoothening()
104 const InputDeviceIdentifier& identifier, nsecs_t currentEventTime, nsecs_t readTime, in applyBluetoothTimestampSmoothening()
105 nsecs_t lastEventTime) { in applyBluetoothTimestampSmoothening()
113 constexpr static nsecs_t MIN_BLUETOOTH_TIMESTAMP_DELTA = ms2ns(4); in applyBluetoothTimestampSmoothening()
116 constexpr static nsecs_t MAX_BLUETOOTH_SMOOTHING_DELTA = ms2ns(32); in applyBluetoothTimestampSmoothening()
117 const nsecs_t smoothenedEventTime = in applyBluetoothTimestampSmoothening()
122 const nsecs_t smoothenedReadTime = in applyBluetoothTimestampSmoothening()
/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();
183 void setActualStartTime(nsecs_t actualStartTime);
184 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/native/services/inputflinger/include/
DNotifyArgs.h45 nsecs_t eventTime;
49 NotifyConfigurationChangedArgs(int32_t id, nsecs_t eventTime);
60 nsecs_t eventTime;
71 nsecs_t downTime;
72 nsecs_t readTime;
76 NotifyKeyArgs(int32_t id, nsecs_t eventTime, nsecs_t readTime, int32_t deviceId,
79 int32_t metaState, nsecs_t downTime);
90 nsecs_t eventTime;
119 nsecs_t downTime;
120 nsecs_t readTime;
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DVSyncDispatchRealtimeTest.cpp33 constexpr nsecs_t toNs(std::chrono::duration<Rep, Per> const& tp) { in toNs()
39 StubTracker(nsecs_t period) : mPeriod(period) {} in StubTracker()
41 bool addVsyncTimestamp(nsecs_t) final { return true; } in addVsyncTimestamp() argument
43 nsecs_t currentPeriod() const final { in currentPeriod()
51 bool isVSyncInPhase(nsecs_t, Fps) final { return false; } in isVSyncInPhase() argument
61 nsecs_t mPeriod;
68 nsecs_t nextAnticipatedVSyncTimeFrom(nsecs_t timePoint, std::optional<nsecs_t>) final { in nextAnticipatedVSyncTimeFrom() argument
79 VRRStubTracker(nsecs_t period) : StubTracker(period) {} in VRRStubTracker()
81 nsecs_t nextAnticipatedVSyncTimeFrom(nsecs_t time_point, std::optional<nsecs_t>) final { in nextAnticipatedVSyncTimeFrom() argument
91 void set_interval(nsecs_t interval, nsecs_t last_known) { in set_interval()
[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/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.h45 static constexpr nsecs_t TIMESTAMP_PENDING = -2;
47 static inline bool isValidTimestamp(nsecs_t time) { in isValidTimestamp()
75 nsecs_t postedTime{TIMESTAMP_PENDING};
76 nsecs_t requestedPresentTime{TIMESTAMP_PENDING};
77 nsecs_t latchTime{TIMESTAMP_PENDING};
78 nsecs_t firstRefreshStartTime{TIMESTAMP_PENDING};
79 nsecs_t lastRefreshStartTime{TIMESTAMP_PENDING};
80 nsecs_t dequeueReadyTime{TIMESTAMP_PENDING};
117 static nsecs_t snapToNextTick(
118 nsecs_t timestamp, nsecs_t tickPhase, nsecs_t tickInterval);
[all …]
DCompositorTiming.h25 static constexpr nsecs_t kDefaultVsyncPeriod = 16'666'667;
28 CompositorTiming(nsecs_t vsyncDeadline, nsecs_t vsyncPeriod, nsecs_t vsyncPhase,
29 nsecs_t presentLatency);
32 nsecs_t deadline = 0;
35 nsecs_t interval = kDefaultVsyncPeriod;
40 nsecs_t presentLatency = kDefaultVsyncPeriod;
/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/libs/gui/
DCompositorTiming.cpp25 CompositorTiming::CompositorTiming(nsecs_t vsyncDeadline, nsecs_t vsyncPeriod, nsecs_t vsyncPhase, in CompositorTiming()
26 nsecs_t presentLatency) { in CompositorTiming()
32 const nsecs_t idealLatency = [=] { in CompositorTiming()
36 const nsecs_t latency = (vsyncPeriod - vsyncPhase) % vsyncPeriod; in CompositorTiming()
44 const nsecs_t bias = vsyncPeriod / 2; in CompositorTiming()
45 const nsecs_t extraVsyncs = (presentLatency - idealLatency + bias) / vsyncPeriod; in CompositorTiming()
46 const nsecs_t snappedLatency = in CompositorTiming()
/frameworks/native/services/surfaceflinger/TimeStats/
DTimeStats.h66 virtual void recordFrameDuration(nsecs_t startTime, nsecs_t endTime) = 0;
70 virtual void recordRenderEngineDuration(nsecs_t startTime, nsecs_t endTime) = 0;
72 virtual void recordRenderEngineDuration(nsecs_t startTime,
76 uid_t uid, nsecs_t postTime, GameMode) = 0;
77 virtual void setLatchTime(int32_t layerId, uint64_t frameNumber, nsecs_t latchTime) = 0;
90 virtual void setDesiredTime(int32_t layerId, uint64_t frameNumber, nsecs_t desiredTime) = 0;
91 virtual void setAcquireTime(int32_t layerId, uint64_t frameNumber, nsecs_t acquireTime) = 0;
96 virtual void setPresentTime(int32_t layerId, uint64_t frameNumber, nsecs_t presentTime,
122 nsecs_t displayDeadlineDelta = 0;
123 nsecs_t displayPresentJitter = 0;
[all …]
/frameworks/native/services/inputflinger/tests/fuzzers/
DLatencyTrackerFuzzer.cpp69 nsecs_t eventTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
70 nsecs_t readTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
80 nsecs_t deliveryTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
81 nsecs_t consumeTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
82 nsecs_t finishTime = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
89 std::array<nsecs_t, GraphicsTimeline::SIZE> graphicsTimeline; in LLVMFuzzerTestOneInput()
91 graphicsTimeline[i] = fdp.ConsumeIntegral<nsecs_t>(); in LLVMFuzzerTestOneInput()
/frameworks/native/libs/gui/tests/
DCompositorTiming_test.cpp23 constexpr nsecs_t kMillisecond = 1'000'000;
24 constexpr nsecs_t kVsyncPeriod = 8'333'333;
25 constexpr nsecs_t kVsyncPhase = -2'166'667;
26 constexpr nsecs_t kIdealLatency = -kVsyncPhase;
31 const nsecs_t vsyncDeadline = systemTime(); in TEST()
32 constexpr nsecs_t kInvalidVsyncPeriod = -1; in TEST()
43 for (nsecs_t presentDelay = 0, compositeTime = systemTime(); presentDelay < 10 * kVsyncPeriod; in TEST()
45 const nsecs_t presentLatency = kIdealLatency + presentDelay; in TEST()
46 const nsecs_t vsyncDeadline = compositeTime + presentLatency + kVsyncPeriod; in TEST()
/frameworks/native/services/surfaceflinger/tests/unittests/mock/
DMockTimeStats.h37 MOCK_METHOD2(recordFrameDuration, void(nsecs_t, nsecs_t));
38 MOCK_METHOD2(recordRenderEngineDuration, void(nsecs_t, nsecs_t));
39 MOCK_METHOD2(recordRenderEngineDuration, void(nsecs_t, const std::shared_ptr<FenceTime>&));
41 (int32_t, uint64_t, const std::string&, uid_t, nsecs_t, GameMode), (override));
44 MOCK_METHOD3(setLatchTime, void(int32_t, uint64_t, nsecs_t));
45 MOCK_METHOD3(setDesiredTime, void(int32_t, uint64_t, nsecs_t));
46 MOCK_METHOD3(setAcquireTime, void(int32_t, uint64_t, nsecs_t));
49 (int32_t, uint64_t, nsecs_t, Fps, std::optional<Fps>, SetFrameRateVote, GameMode),
60 MOCK_METHOD2(recordRefreshRate, void(uint32_t, nsecs_t));

12345678910>>...25