diff options
author | Jun Mukai <mukai@google.com> | 2015-10-27 10:09:21 -0700 |
---|---|---|
committer | Jun Mukai <mukai@google.com> | 2015-10-30 10:24:55 -0700 |
commit | c0c0ac37abe6f0b1ab780765b4a48beada7d3444 (patch) | |
tree | 40cb4eb99cc3108f3b2f0aa5e51a37170e18993e /libs/input/PointerController.h | |
parent | f789ef7e381ea57a4f515fde470d40f93bc5f345 (diff) |
Bring DisplayEventReceiver to PointerController.
Now the fading animation of pointers is handled at vsync.
Change-Id: I10fe27d9d7a0d46c4e6504ca487e80bb56e2fd98
Diffstat (limited to 'libs/input/PointerController.h')
-rw-r--r-- | libs/input/PointerController.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h index 24a16819384e..6d840db0ec5c 100644 --- a/libs/input/PointerController.h +++ b/libs/input/PointerController.h @@ -28,6 +28,7 @@ #include <utils/RefBase.h> #include <utils/Looper.h> #include <utils/String8.h> +#include <gui/DisplayEventReceiver.h> #include <SkBitmap.h> @@ -68,7 +69,8 @@ public: * * Handles pointer acceleration and animation. */ -class PointerController : public PointerControllerInterface, public MessageHandler { +class PointerController : public PointerControllerInterface, public MessageHandler, + public LooperCallback { protected: virtual ~PointerController(); @@ -106,7 +108,6 @@ private: static const size_t MAX_SPOTS = 12; enum { - MSG_ANIMATE, MSG_INACTIVITY_TIMEOUT, }; @@ -136,6 +137,8 @@ private: sp<SpriteController> mSpriteController; sp<WeakMessageHandler> mHandler; + DisplayEventReceiver mDisplayEventReceiver; + PointerResources mResources; struct Locked { @@ -173,7 +176,8 @@ private: void setPositionLocked(float x, float y); void handleMessage(const Message& message); - void doAnimate(); + int handleEvent(int fd, int events, void* data); + void doAnimate(nsecs_t timestamp); void doInactivityTimeout(); void startAnimationLocked(); |