diff options
author | Mathias Agopian <mathias@google.com> | 2012-09-04 19:30:46 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-09-04 19:30:46 -0700 |
commit | 00e8c7a88a5b9c4104a71013a713acd3e4d3b77b (patch) | |
tree | 71fd225e0f7f8dd1a909c64c97718989aa8f06c2 /libs | |
parent | da8d0a5c0cf9d41915d3b106cad4aaec3e767c11 (diff) | |
download | android_frameworks_native-00e8c7a88a5b9c4104a71013a713acd3e4d3b77b.tar.gz android_frameworks_native-00e8c7a88a5b9c4104a71013a713acd3e4d3b77b.tar.bz2 android_frameworks_native-00e8c7a88a5b9c4104a71013a713acd3e4d3b77b.zip |
display projection API now has a single function instead of 3
Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 60 |
1 files changed, 17 insertions, 43 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index e4922a440..814036e3f 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -119,9 +119,10 @@ public: void setDisplaySurface(const sp<IBinder>& token, const sp<ISurfaceTexture>& surface); void setDisplayLayerStack(const sp<IBinder>& token, uint32_t layerStack); - void setDisplayOrientation(const sp<IBinder>& token, uint32_t orientation); - void setDisplayViewport(const sp<IBinder>& token, const Rect& viewport); - void setDisplayFrame(const sp<IBinder>& token, const Rect& frame); + void setDisplayProjection(const sp<IBinder>& token, + uint32_t orientation, + const Rect& layerStackRect, + const Rect& displayRect); static void closeGlobalTransaction(bool synchronous) { Composer::getInstance().closeGlobalTransactionImpl(synchronous); @@ -326,39 +327,19 @@ void Composer::setDisplayLayerStack(const sp<IBinder>& token, s.what |= DisplayState::eLayerStackChanged; } -void Composer::setDisplayOrientation(const sp<IBinder>& token, - uint32_t orientation) { +void Composer::setDisplayProjection(const sp<IBinder>& token, + uint32_t orientation, + const Rect& layerStackRect, + const Rect& displayRect) { Mutex::Autolock _l(mLock); DisplayState& s(getDisplayStateLocked(token)); s.orientation = orientation; - s.what |= DisplayState::eOrientationChanged; + s.viewport = layerStackRect; + s.frame = displayRect; + s.what |= DisplayState::eDisplayProjectionChanged; mForceSynchronous = true; // TODO: do we actually still need this? } -// FIXME: get rid of this eventually -status_t Composer::setOrientation(int orientation) { - sp<ISurfaceComposer> sm(ComposerService::getComposerService()); - sp<IBinder> token(sm->getBuiltInDisplay(ISurfaceComposer::eDisplayIdMain)); - Composer::setDisplayOrientation(token, orientation); - return NO_ERROR; -} - -void Composer::setDisplayViewport(const sp<IBinder>& token, - const Rect& viewport) { - Mutex::Autolock _l(mLock); - DisplayState& s(getDisplayStateLocked(token)); - s.viewport = viewport; - s.what |= DisplayState::eViewportChanged; -} - -void Composer::setDisplayFrame(const sp<IBinder>& token, - const Rect& frame) { - Mutex::Autolock _l(mLock); - DisplayState& s(getDisplayStateLocked(token)); - s.frame = frame; - s.what |= DisplayState::eFrameChanged; -} - // --------------------------------------------------------------------------- SurfaceComposerClient::SurfaceComposerClient() @@ -520,19 +501,12 @@ void SurfaceComposerClient::setDisplayLayerStack(const sp<IBinder>& token, Composer::getInstance().setDisplayLayerStack(token, layerStack); } -void SurfaceComposerClient::setDisplayOrientation(const sp<IBinder>& token, - uint32_t orientation) { - Composer::getInstance().setDisplayOrientation(token, orientation); -} - -void SurfaceComposerClient::setDisplayViewport(const sp<IBinder>& token, - const Rect& viewport) { - Composer::getInstance().setDisplayViewport(token, viewport); -} - -void SurfaceComposerClient::setDisplayFrame(const sp<IBinder>& token, - const Rect& frame) { - Composer::getInstance().setDisplayFrame(token, frame); +void SurfaceComposerClient::setDisplayProjection(const sp<IBinder>& token, + uint32_t orientation, + const Rect& layerStackRect, + const Rect& displayRect) { + Composer::getInstance().setDisplayProjection(token, orientation, + layerStackRect, displayRect); } // ---------------------------------------------------------------------------- |