Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 927c3e15 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10106040 from 8b0d097a to udc-release

Change-Id: I6b2897979a61401bb7dee4e3db0da9a06398d811
parents 9fa2009d 8b0d097a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}

+3 −0
Original line number Diff line number Diff line
@@ -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;
    }
}

@@ -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&
+4 −0
Original line number Diff line number Diff line
@@ -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;
}
+5 −6
Original line number Diff line number Diff line
@@ -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);
}

// ------------------------------------------------------------------------------------------------
+4 −4
Original line number Diff line number Diff line
@@ -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
@@ -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.
@@ -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