From 1f6078aef71b1d3f080cd565adbec350c71088dd Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Thu, 26 Jun 2014 16:01:02 -0700 Subject: Have VirtualDisplays send SF resize messages when resizing Change-Id: I76d15b22099a659450ec875836c9bf2b6584838f --- libs/gui/SurfaceComposerClient.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libs/gui/SurfaceComposerClient.cpp') diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 3bee3fc6e9..6e13207a83 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -166,6 +166,7 @@ public: uint32_t orientation, const Rect& layerStackRect, const Rect& displayRect); + void setDisplaySize(const sp& token, uint32_t width, uint32_t height); static void setAnimationTransaction() { Composer::getInstance().setAnimationTransactionImpl(); @@ -426,6 +427,14 @@ void Composer::setDisplayProjection(const sp& token, mForceSynchronous = true; // TODO: do we actually still need this? } +void Composer::setDisplaySize(const sp& token, uint32_t width, uint32_t height) { + Mutex::Autolock _l(mLock); + DisplayState& s(getDisplayStateLocked(token)); + s.width = width; + s.height = height; + s.what |= DisplayState::eDisplaySizeChanged; +} + // --------------------------------------------------------------------------- SurfaceComposerClient::SurfaceComposerClient() @@ -621,6 +630,11 @@ void SurfaceComposerClient::setDisplayProjection(const sp& token, layerStackRect, displayRect); } +void SurfaceComposerClient::setDisplaySize(const sp& token, + uint32_t width, uint32_t height) { + Composer::getInstance().setDisplaySize(token, width, height); +} + // ---------------------------------------------------------------------------- status_t SurfaceComposerClient::getDisplayConfigs( -- cgit v1.2.3-59-g8ed1b