TouchInputMapper: Use ui::Size and Rect for display info
There should be no behavior changes in this CL.
Bug: 236798672
Test: atest inputflinger_tests
Change-Id: Iba3bd7280ca9c3dddd224efef42b8b00b6f2bab8
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.h b/services/inputflinger/reader/mapper/TouchInputMapper.h
index 788ec58..769caf0 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.h
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.h
@@ -412,17 +412,13 @@
// The components of the viewport are specified in the display's rotated orientation.
DisplayViewport mViewport;
- // The width and height are obtained from the viewport and are specified
- // in the natural orientation.
- int32_t mDisplayWidth;
- int32_t mDisplayHeight;
+ // The display size obtained from the viewport in the natural orientation.
+ // Always starts at (0, 0).
+ ui::Size mDisplayBounds{ui::kInvalidSize};
- // The physical frame is the rectangle in the display's coordinate space that maps to the
+ // The physical frame is the rectangle in the display's coordinate space that maps to
// the logical display frame.
- int32_t mPhysicalWidth;
- int32_t mPhysicalHeight;
- int32_t mPhysicalLeft;
- int32_t mPhysicalTop;
+ Rect mPhysicalFrameInDisplay{Rect::INVALID_RECT};
// The orientation of the input device relative to that of the display panel. It specifies
// the rotation of the input device coordinates required to produce the display panel