Swap width and height in TouchVideoFrame

Currently in TouchVideoFrame and related code, the field 'width'
precedes the field 'height'.
But these fields should be  interpreted as follows:
width -> number  of columns
height -> number of rows
In most notations in mathematics, the matrix sizes are designated as
'mxn', where m is the number of rows and n is the number of columns.

So we make TouchVideoFrame consistent with this, and swap these 2
fields.

Test: atest libinput_tests
The actual test is added in the next commit.
Bug: 123241238

Change-Id: I808e7f354bd7b62d5599324eef205bf4450a91c1
diff --git a/services/inputflinger/TouchVideoDevice.h b/services/inputflinger/TouchVideoDevice.h
index 3d5c8c6..0e7e2ef 100644
--- a/services/inputflinger/TouchVideoDevice.h
+++ b/services/inputflinger/TouchVideoDevice.h
@@ -54,14 +54,14 @@
      */
     const std::string& getPath() const { return mPath; }
     /**
-     * Get the width of the heatmap frame
-     */
-    uint32_t getWidth() const { return mWidth; }
-    /**
      * Get the height of the heatmap frame
      */
     uint32_t getHeight() const { return mHeight; }
     /**
+     * Get the width of the heatmap frame
+     */
+    uint32_t getWidth() const { return mWidth; }
+    /**
      * Direct read of the frame. Stores the frame into internal buffer.
      * Return the number of frames that were successfully read.
      *
@@ -87,8 +87,8 @@
     std::string mName;
     std::string mPath;
 
-    uint32_t mWidth;
     uint32_t mHeight;
+    uint32_t mWidth;
 
     static constexpr int INVALID_FD = -1;
     /**
@@ -110,7 +110,7 @@
      * To get a new TouchVideoDevice, use 'create' instead.
      */
     explicit TouchVideoDevice(int fd, std::string&& name, std::string&& devicePath,
-            uint32_t width, uint32_t height,
+            uint32_t height, uint32_t width,
             const std::array<const int16_t*, NUM_BUFFERS>& readLocations);
     /**
      * Read all currently available frames.