diff options
author | Jason Gerecke <killertofu@gmail.com> | 2014-01-27 18:34:20 -0800 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2014-03-10 14:23:59 -0700 |
commit | 12d6baa9b832f16a28f048ed5ffab75a76ed9c41 (patch) | |
tree | cf6293250f6be73839bbe1691e08b6a1df507b4f /services/inputflinger/InputReader.h | |
parent | af126fb538c39d5488d62695b1bfb2990a3ef7db (diff) | |
download | frameworks_native-12d6baa9b832f16a28f048ed5ffab75a76ed9c41.zip frameworks_native-12d6baa9b832f16a28f048ed5ffab75a76ed9c41.tar.gz frameworks_native-12d6baa9b832f16a28f048ed5ffab75a76ed9c41.tar.bz2 |
Initialize mAffineTransform and update on modification
This patch causes the InputReader to update its mAffineTransform to reflect
the currently-set calibration on startup and whenever its value is changed
through the InputManagerService.
Change-Id: I4719122a28afa9833772040f0433780a84240b9d
Diffstat (limited to 'services/inputflinger/InputReader.h')
-rw-r--r-- | services/inputflinger/InputReader.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/inputflinger/InputReader.h b/services/inputflinger/InputReader.h index 5c72c71..0e57bcd 100644 --- a/services/inputflinger/InputReader.h +++ b/services/inputflinger/InputReader.h @@ -138,6 +138,9 @@ struct InputReaderConfiguration { // The device name alias supplied by the may have changed for some devices. CHANGE_DEVICE_ALIAS = 1 << 5, + // The location calibration matrix changed. + TOUCH_AFFINE_TRANSFORMATION = 1 << 6, + // All devices must be reopened. CHANGE_MUST_REOPEN = 1 << 31, }; @@ -304,6 +307,10 @@ public: /* Gets a user-supplied alias for a particular input device, or an empty string if none. */ virtual String8 getDeviceAlias(const InputDeviceIdentifier& identifier) = 0; + + /* Gets the affine calibration associated with the specified device. */ + virtual TouchAffineTransformation getTouchAffineTransformation( + const String8& inputDeviceDescriptor) = 0; }; @@ -535,6 +542,7 @@ public: inline int32_t getControllerNumber() const { return mControllerNumber; } inline int32_t getGeneration() const { return mGeneration; } inline const String8& getName() const { return mIdentifier.name; } + inline const String8& getDescriptor() { return mIdentifier.descriptor; } inline uint32_t getClasses() const { return mClasses; } inline uint32_t getSources() const { return mSources; } @@ -1366,6 +1374,7 @@ protected: virtual void dumpCalibration(String8& dump); virtual void dumpAffineTransformation(String8& dump); virtual bool hasStylus() const = 0; + virtual void updateAffineTransformation(); virtual void syncTouch(nsecs_t when, bool* outHavePointerIds) = 0; |