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
diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h
index 8b33190..afd7215 100644
--- a/libs/input/PointerController.h
+++ b/libs/input/PointerController.h
@@ -51,9 +51,9 @@
~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 @@
~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 {