summaryrefslogtreecommitdiff
path: root/libs/input/SpriteController.h
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-01-10 11:29:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-01-10 11:29:48 +0000
commitb42f9c93cb230cdd88df4cfaa55a635cc4fb5321 (patch)
tree00c745c9722cb8e29bde929326edfd8fccb99fcc /libs/input/SpriteController.h
parent860cdf5ad6416e1d54a502bdbdc0d3a3f0b70780 (diff)
parentb9b320093cdbaaf674830025c1ff95c0f8ae1877 (diff)
Merge "Support mouse pointer on external displays (2/2)"
Diffstat (limited to 'libs/input/SpriteController.h')
-rw-r--r--libs/input/SpriteController.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/input/SpriteController.h b/libs/input/SpriteController.h
index 31e43e9b99e5..5b216f50d113 100644
--- a/libs/input/SpriteController.h
+++ b/libs/input/SpriteController.h
@@ -125,6 +125,9 @@ public:
/* Sets the sprite transformation matrix. */
virtual void setTransformationMatrix(const SpriteTransformationMatrix& matrix) = 0;
+
+ /* Sets the id of the display where the sprite should be shown. */
+ virtual void setDisplayId(int32_t displayId) = 0;
};
/*
@@ -170,6 +173,7 @@ private:
DIRTY_LAYER = 1 << 4,
DIRTY_VISIBILITY = 1 << 5,
DIRTY_HOTSPOT = 1 << 6,
+ DIRTY_DISPLAY_ID = 1 << 7,
};
/* Describes the state of a sprite.
@@ -180,7 +184,7 @@ private:
struct SpriteState {
inline SpriteState() :
dirty(0), visible(false),
- positionX(0), positionY(0), layer(0), alpha(1.0f),
+ positionX(0), positionY(0), layer(0), alpha(1.0f), displayId(ADISPLAY_ID_DEFAULT),
surfaceWidth(0), surfaceHeight(0), surfaceDrawn(false), surfaceVisible(false) {
}
@@ -193,6 +197,7 @@ private:
int32_t layer;
float alpha;
SpriteTransformationMatrix transformationMatrix;
+ int32_t displayId;
sp<SurfaceControl> surfaceControl;
int32_t surfaceWidth;
@@ -225,6 +230,7 @@ private:
virtual void setLayer(int32_t layer);
virtual void setAlpha(float alpha);
virtual void setTransformationMatrix(const SpriteTransformationMatrix& matrix);
+ virtual void setDisplayId(int32_t displayId);
inline const SpriteState& getStateLocked() const {
return mLocked.state;