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

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

Snap for 11510485 from c8c97d58 to 24Q2-release

Change-Id: Ic656a30f382e429e1d81ef640558672f2028de5f
parents 9d7153ae c8c97d58
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ bool ValidateFrameRate(float frameRate, int8_t compatibility, int8_t changeFrame

    if (compatibility != ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT &&
        compatibility != ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_FIXED_SOURCE &&
        compatibility != ANATIVEWINDOW_FRAME_RATE_GTE &&
        (!privileged ||
         (compatibility != ANATIVEWINDOW_FRAME_RATE_EXACT &&
          compatibility != ANATIVEWINDOW_FRAME_RATE_NO_VOTE))) {
+5 −5
Original line number Diff line number Diff line
@@ -262,8 +262,6 @@ void WindowInfoHandle::updateFrom(sp<WindowInfoHandle> handle) {
}

std::ostream& operator<<(std::ostream& out, const WindowInfo& info) {
    std::string transform;
    info.transform.dump(transform, "transform", "    ");
    out << "name=" << info.name << ", id=" << info.id << ", displayId=" << info.displayId
        << ", inputConfig=" << info.inputConfig.string() << ", alpha=" << info.alpha << ", frame=["
        << info.frame.left << "," << info.frame.top << "][" << info.frame.right << ","
@@ -274,9 +272,11 @@ std::ostream& operator<<(std::ostream& out, const WindowInfo& info) {
        << ", ownerUid=" << info.ownerUid.toString() << ", dispatchingTimeout="
        << std::chrono::duration_cast<std::chrono::milliseconds>(info.dispatchingTimeout).count()
        << "ms, token=" << info.token.get()
        << ", touchOcclusionMode=" << ftl::enum_string(info.touchOcclusionMode) << "\n"
        << transform;
    if (info.canOccludePresentation) out << " canOccludePresentation";
        << ", touchOcclusionMode=" << ftl::enum_string(info.touchOcclusionMode);
    if (info.canOccludePresentation) out << ", canOccludePresentation";
    std::string transform;
    info.transform.dump(transform, "transform", "    ");
    out << "\n" << transform;
    return out;
}

+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@ TEST(FrameRateUtilsTest, ValidateFrameRate) {
                                  ANATIVEWINDOW_CHANGE_FRAME_RATE_ALWAYS, ""));
    EXPECT_TRUE(ValidateFrameRate(60.0f, ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
                                  ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS, ""));
    EXPECT_TRUE(ValidateFrameRate(60.0f, ANATIVEWINDOW_FRAME_RATE_GTE,
                                  ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS, ""));

    // Privileged APIs.
    EXPECT_FALSE(ValidateFrameRate(60.0f, ANATIVEWINDOW_FRAME_RATE_EXACT,
+8 −1
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ namespace android {
// The default velocity control parameters that has no effect.
static const VelocityControlParameters FLAT_VELOCITY_CONTROL_PARAMS{};

static const bool ENABLE_POINTER_CHOREOGRAPHER = input_flags::enable_pointer_choreographer();

// --- CursorMotionAccumulator ---

CursorMotionAccumulator::CursorMotionAccumulator() {
@@ -76,9 +78,14 @@ void CursorMotionAccumulator::finishSync() {

CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext,
                                     const InputReaderConfiguration& readerConfig)
      : CursorInputMapper(deviceContext, readerConfig, ENABLE_POINTER_CHOREOGRAPHER) {}

CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext,
                                     const InputReaderConfiguration& readerConfig,
                                     bool enablePointerChoreographer)
      : InputMapper(deviceContext, readerConfig),
        mLastEventTime(std::numeric_limits<nsecs_t>::min()),
        mEnablePointerChoreographer(input_flags::enable_pointer_choreographer()),
        mEnablePointerChoreographer(enablePointerChoreographer),
        mEnableNewMousePointerBallistics(input_flags::enable_new_mouse_pointer_ballistics()) {}

CursorInputMapper::~CursorInputMapper() {
+4 −0
Original line number Diff line number Diff line
@@ -133,6 +133,10 @@ private:

    explicit CursorInputMapper(InputDeviceContext& deviceContext,
                               const InputReaderConfiguration& readerConfig);
    // Constructor for testing.
    explicit CursorInputMapper(InputDeviceContext& deviceContext,
                               const InputReaderConfiguration& readerConfig,
                               bool enablePointerChoreographer);
    void dumpParameters(std::string& dump);
    void configureBasicParams();
    void configureOnPointerCapture(const InputReaderConfiguration& config);
Loading