diff options
| author | 2024-05-07 21:15:44 +0000 | |
|---|---|---|
| committer | 2024-05-07 21:15:44 +0000 | |
| commit | ec44865a5cb6194f4d2b5dffd0b6d3e77da69388 (patch) | |
| tree | 1ab44492afdc48b4ae47a7ff15e58bf807e95eec /libs/input/SpriteController.h | |
| parent | d955927ba0f4794defab38eb179affc802f40c11 (diff) | |
| parent | 80fd68a08911b984fcfee6ad1960f9ff3bb6274d (diff) | |
Merge "Hide touch indicators on mirrored displays if a secure window is present" into main
Diffstat (limited to 'libs/input/SpriteController.h')
| -rw-r--r-- | libs/input/SpriteController.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/input/SpriteController.h b/libs/input/SpriteController.h index 35776e9961b3..4e4ba6551aec 100644 --- a/libs/input/SpriteController.h +++ b/libs/input/SpriteController.h @@ -96,6 +96,10 @@ public: /* Sets the id of the display where the sprite should be shown. */ virtual void setDisplayId(int32_t displayId) = 0; + + /* Sets the flag to hide sprite on mirrored displays. + * This will add ISurfaceComposerClient::eSkipScreenshot flag to the sprite. */ + virtual void setSkipScreenshot(bool skip) = 0; }; /* @@ -152,6 +156,7 @@ private: DIRTY_DISPLAY_ID = 1 << 7, DIRTY_ICON_STYLE = 1 << 8, DIRTY_DRAW_DROP_SHADOW = 1 << 9, + DIRTY_SKIP_SCREENSHOT = 1 << 10, }; /* Describes the state of a sprite. @@ -182,6 +187,7 @@ private: int32_t surfaceHeight; bool surfaceDrawn; bool surfaceVisible; + bool skipScreenshot; inline bool wantSurfaceVisible() const { return visible && alpha > 0.0f && icon.isValid(); @@ -209,6 +215,7 @@ private: virtual void setAlpha(float alpha); virtual void setTransformationMatrix(const SpriteTransformationMatrix& matrix); virtual void setDisplayId(int32_t displayId); + virtual void setSkipScreenshot(bool skip); inline const SpriteState& getStateLocked() const { return mLocked.state; @@ -272,7 +279,8 @@ private: void doDisposeSurfaces(); void ensureSurfaceComposerClient(); - sp<SurfaceControl> obtainSurface(int32_t width, int32_t height, int32_t displayId); + sp<SurfaceControl> obtainSurface(int32_t width, int32_t height, int32_t displayId, + bool hideOnMirrored); }; } // namespace android |