summaryrefslogtreecommitdiff
path: root/include/input/TouchVideoFrame.h
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2019-02-15 17:10:53 -0600
committer Siarhei Vishniakou <svv@google.com> 2019-02-15 18:33:06 -0600
commitfda3aee5b7b17bc64e66e1f6f7aaa7d2e3ac1419 (patch)
treeafa967fdce0135a220b3bdee187c94e1711064de /include/input/TouchVideoFrame.h
parent26cf29d722a486981a98a63dc0121c5663ee3fa1 (diff)
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
Diffstat (limited to 'include/input/TouchVideoFrame.h')
-rw-r--r--include/input/TouchVideoFrame.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/input/TouchVideoFrame.h b/include/input/TouchVideoFrame.h
index a0f4f2703f..566c334e57 100644
--- a/include/input/TouchVideoFrame.h
+++ b/include/input/TouchVideoFrame.h
@@ -30,20 +30,20 @@ namespace android {
*/
class TouchVideoFrame {
public:
- TouchVideoFrame(uint32_t width, uint32_t height, std::vector<int16_t> data,
+ TouchVideoFrame(uint32_t height, uint32_t width, std::vector<int16_t> data,
const struct timeval& timestamp);
bool operator==(const TouchVideoFrame& rhs) const;
/**
- * Width of the frame
- */
- uint32_t getWidth() const;
- /**
* Height of the frame
*/
uint32_t getHeight() const;
/**
+ * Width of the frame
+ */
+ uint32_t getWidth() const;
+ /**
* The touch strength data.
* The array is a 2-D row-major matrix, with dimensions (height, width).
* Total size of the array should equal getHeight() * getWidth().
@@ -56,8 +56,8 @@ public:
const struct timeval& getTimestamp() const;
private:
- uint32_t mWidth;
uint32_t mHeight;
+ uint32_t mWidth;
std::vector<int16_t> mData;
struct timeval mTimestamp;
};