Loading libs/gui/Surface.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1871,12 +1871,14 @@ int Surface::dispatchSetFrameTimelineInfo(va_list args) { auto frameTimelineVsyncId = static_cast<int64_t>(va_arg(args, int64_t)); auto inputEventId = static_cast<int32_t>(va_arg(args, int32_t)); auto startTimeNanos = static_cast<int64_t>(va_arg(args, int64_t)); auto useForRefreshRateSelection = static_cast<bool>(va_arg(args, int32_t)); ALOGV("Surface::%s", __func__); FrameTimelineInfo ftlInfo; ftlInfo.vsyncId = frameTimelineVsyncId; ftlInfo.inputEventId = inputEventId; ftlInfo.startTimeNanos = startTimeNanos; ftlInfo.useForRefreshRateSelection = useForRefreshRateSelection; return setFrameTimelineInfo(frameNumber, ftlInfo); } Loading libs/gui/SurfaceComposerClient.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -2245,11 +2245,13 @@ void SurfaceComposerClient::Transaction::mergeFrameTimelineInfo(FrameTimelineInf t.vsyncId = other.vsyncId; t.inputEventId = other.inputEventId; t.startTimeNanos = other.startTimeNanos; t.useForRefreshRateSelection = other.useForRefreshRateSelection; } } else if (t.vsyncId == FrameTimelineInfo::INVALID_VSYNC_ID) { t.vsyncId = other.vsyncId; t.inputEventId = other.inputEventId; t.startTimeNanos = other.startTimeNanos; t.useForRefreshRateSelection = other.useForRefreshRateSelection; } } Loading @@ -2258,6 +2260,7 @@ void SurfaceComposerClient::Transaction::clearFrameTimelineInfo(FrameTimelineInf t.vsyncId = FrameTimelineInfo::INVALID_VSYNC_ID; t.inputEventId = os::IInputConstants::INVALID_INPUT_EVENT_ID; t.startTimeNanos = 0; t.useForRefreshRateSelection = false; } SurfaceComposerClient::Transaction& Loading libs/gui/aidl/android/gui/FrameTimelineInfo.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,8 @@ parcelable FrameTimelineInfo { // The current time in nanoseconds the application started to render the frame. long startTimeNanos = 0; // Whether this vsyncId should be used to heuristically select the display refresh rate // TODO(b/281695725): Clean this up once TextureView use setFrameRate API boolean useForRefreshRateSelection = false; } libs/nativewindow/include/system/window.h +5 −6 Original line number Diff line number Diff line Loading @@ -1066,13 +1066,12 @@ static inline int native_window_set_frame_rate(struct ANativeWindow* window, flo (int)compatibility, (int)changeFrameRateStrategy); } static inline int native_window_set_frame_timeline_info(struct ANativeWindow* window, uint64_t frameNumber, int64_t frameTimelineVsyncId, int32_t inputEventId, int64_t startTimeNanos) { static inline int native_window_set_frame_timeline_info( struct ANativeWindow* window, uint64_t frameNumber, int64_t frameTimelineVsyncId, int32_t inputEventId, int64_t startTimeNanos, int32_t useForRefreshRateSelection) { return window->perform(window, NATIVE_WINDOW_SET_FRAME_TIMELINE_INFO, frameNumber, frameTimelineVsyncId, inputEventId, startTimeNanos); frameTimelineVsyncId, inputEventId, startTimeNanos, useForRefreshRateSelection); } // ------------------------------------------------------------------------------------------------ Loading services/inputflinger/reader/InputDevice.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ std::list<NotifyArgs> InputDevice::configure(nsecs_t when, using Change = InputReaderConfiguration::Change; if (!isIgnored()) { if (!changes.any() || !isIgnored()) { // Full configuration should happen the first time configure is called // and when the device type is changed. Changing a device type can // affect various other parameters so should result in a Loading Loading @@ -503,9 +503,9 @@ std::vector<std::unique_ptr<InputMapper>> InputDevice::createMappers( classes.test(InputDeviceClass::TOUCH_MT) && !isSonyDualShock4Touchpad) { mappers.push_back(std::make_unique<TouchpadInputMapper>(contextPtr, readerConfig)); } else if (classes.test(InputDeviceClass::TOUCH_MT)) { mappers.push_back(std::make_unique<MultiTouchInputMapper>(contextPtr, readerConfig)); mappers.push_back(createInputMapper<MultiTouchInputMapper>(contextPtr, readerConfig)); } else if (classes.test(InputDeviceClass::TOUCH)) { mappers.push_back(std::make_unique<SingleTouchInputMapper>(contextPtr, readerConfig)); mappers.push_back(createInputMapper<SingleTouchInputMapper>(contextPtr, readerConfig)); } // Joystick-like devices. Loading @@ -520,7 +520,7 @@ std::vector<std::unique_ptr<InputMapper>> InputDevice::createMappers( // External stylus-like devices. if (classes.test(InputDeviceClass::EXTERNAL_STYLUS)) { mappers.push_back(std::make_unique<ExternalStylusInputMapper>(contextPtr, readerConfig)); mappers.push_back(createInputMapper<ExternalStylusInputMapper>(contextPtr, readerConfig)); } return mappers; } Loading Loading
libs/gui/Surface.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1871,12 +1871,14 @@ int Surface::dispatchSetFrameTimelineInfo(va_list args) { auto frameTimelineVsyncId = static_cast<int64_t>(va_arg(args, int64_t)); auto inputEventId = static_cast<int32_t>(va_arg(args, int32_t)); auto startTimeNanos = static_cast<int64_t>(va_arg(args, int64_t)); auto useForRefreshRateSelection = static_cast<bool>(va_arg(args, int32_t)); ALOGV("Surface::%s", __func__); FrameTimelineInfo ftlInfo; ftlInfo.vsyncId = frameTimelineVsyncId; ftlInfo.inputEventId = inputEventId; ftlInfo.startTimeNanos = startTimeNanos; ftlInfo.useForRefreshRateSelection = useForRefreshRateSelection; return setFrameTimelineInfo(frameNumber, ftlInfo); } Loading
libs/gui/SurfaceComposerClient.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -2245,11 +2245,13 @@ void SurfaceComposerClient::Transaction::mergeFrameTimelineInfo(FrameTimelineInf t.vsyncId = other.vsyncId; t.inputEventId = other.inputEventId; t.startTimeNanos = other.startTimeNanos; t.useForRefreshRateSelection = other.useForRefreshRateSelection; } } else if (t.vsyncId == FrameTimelineInfo::INVALID_VSYNC_ID) { t.vsyncId = other.vsyncId; t.inputEventId = other.inputEventId; t.startTimeNanos = other.startTimeNanos; t.useForRefreshRateSelection = other.useForRefreshRateSelection; } } Loading @@ -2258,6 +2260,7 @@ void SurfaceComposerClient::Transaction::clearFrameTimelineInfo(FrameTimelineInf t.vsyncId = FrameTimelineInfo::INVALID_VSYNC_ID; t.inputEventId = os::IInputConstants::INVALID_INPUT_EVENT_ID; t.startTimeNanos = 0; t.useForRefreshRateSelection = false; } SurfaceComposerClient::Transaction& Loading
libs/gui/aidl/android/gui/FrameTimelineInfo.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,8 @@ parcelable FrameTimelineInfo { // The current time in nanoseconds the application started to render the frame. long startTimeNanos = 0; // Whether this vsyncId should be used to heuristically select the display refresh rate // TODO(b/281695725): Clean this up once TextureView use setFrameRate API boolean useForRefreshRateSelection = false; }
libs/nativewindow/include/system/window.h +5 −6 Original line number Diff line number Diff line Loading @@ -1066,13 +1066,12 @@ static inline int native_window_set_frame_rate(struct ANativeWindow* window, flo (int)compatibility, (int)changeFrameRateStrategy); } static inline int native_window_set_frame_timeline_info(struct ANativeWindow* window, uint64_t frameNumber, int64_t frameTimelineVsyncId, int32_t inputEventId, int64_t startTimeNanos) { static inline int native_window_set_frame_timeline_info( struct ANativeWindow* window, uint64_t frameNumber, int64_t frameTimelineVsyncId, int32_t inputEventId, int64_t startTimeNanos, int32_t useForRefreshRateSelection) { return window->perform(window, NATIVE_WINDOW_SET_FRAME_TIMELINE_INFO, frameNumber, frameTimelineVsyncId, inputEventId, startTimeNanos); frameTimelineVsyncId, inputEventId, startTimeNanos, useForRefreshRateSelection); } // ------------------------------------------------------------------------------------------------ Loading
services/inputflinger/reader/InputDevice.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ std::list<NotifyArgs> InputDevice::configure(nsecs_t when, using Change = InputReaderConfiguration::Change; if (!isIgnored()) { if (!changes.any() || !isIgnored()) { // Full configuration should happen the first time configure is called // and when the device type is changed. Changing a device type can // affect various other parameters so should result in a Loading Loading @@ -503,9 +503,9 @@ std::vector<std::unique_ptr<InputMapper>> InputDevice::createMappers( classes.test(InputDeviceClass::TOUCH_MT) && !isSonyDualShock4Touchpad) { mappers.push_back(std::make_unique<TouchpadInputMapper>(contextPtr, readerConfig)); } else if (classes.test(InputDeviceClass::TOUCH_MT)) { mappers.push_back(std::make_unique<MultiTouchInputMapper>(contextPtr, readerConfig)); mappers.push_back(createInputMapper<MultiTouchInputMapper>(contextPtr, readerConfig)); } else if (classes.test(InputDeviceClass::TOUCH)) { mappers.push_back(std::make_unique<SingleTouchInputMapper>(contextPtr, readerConfig)); mappers.push_back(createInputMapper<SingleTouchInputMapper>(contextPtr, readerConfig)); } // Joystick-like devices. Loading @@ -520,7 +520,7 @@ std::vector<std::unique_ptr<InputMapper>> InputDevice::createMappers( // External stylus-like devices. if (classes.test(InputDeviceClass::EXTERNAL_STYLUS)) { mappers.push_back(std::make_unique<ExternalStylusInputMapper>(contextPtr, readerConfig)); mappers.push_back(createInputMapper<ExternalStylusInputMapper>(contextPtr, readerConfig)); } return mappers; } Loading