From a09a94d83e421442f9c02166d3fde67c39a13a8c Mon Sep 17 00:00:00 2001 From: Arpit Singh Date: Tue, 26 Nov 2024 15:50:17 +0000 Subject: Refactor to replace FloatPoint by vec2 Using FloatPoint requires unnecessory conversion between vec2 and FloatPoint, which is inefficient. This CL replaces FloatPoint by vec2 everywhere. Test: atest inputflinger_tests Bug: 245989146 Flag: EXEMPT refactor Change-Id: I0bf9cd35392bff424ec65bbaa43918176d31de37 --- libs/input/PointerController.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/input/PointerController.h') diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h index 8b33190cd35f..afd7215c7fba 100644 --- a/libs/input/PointerController.h +++ b/libs/input/PointerController.h @@ -51,9 +51,9 @@ public: ~PointerController() override; - FloatPoint move(float deltaX, float deltaY) override; + vec2 move(float deltaX, float deltaY) override; void setPosition(float x, float y) override; - FloatPoint getPosition() const override; + vec2 getPosition() const override; ui::LogicalDisplayId getDisplayId() const override; void fade(Transition transition) override; void unfade(Transition transition) override; @@ -166,13 +166,13 @@ public: ~TouchPointerController() override; - FloatPoint move(float, float) override { + vec2 move(float, float) override { LOG_ALWAYS_FATAL("Should not be called"); } void setPosition(float, float) override { LOG_ALWAYS_FATAL("Should not be called"); } - FloatPoint getPosition() const override { + vec2 getPosition() const override { LOG_ALWAYS_FATAL("Should not be called"); } ui::LogicalDisplayId getDisplayId() const override { -- cgit v1.2.3-59-g8ed1b