diff options
author | Mathias Agopian <mathias@google.com> | 2012-11-27 18:43:52 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-11-27 18:43:52 -0800 |
commit | 9913b9941ef90a98d826f3338c0a1ec3e4497b8c (patch) | |
tree | 87abab333c202a8bdbc2ad2d2155209bccae8158 /services/surfaceflinger/Layer.cpp | |
parent | 9d0e4708a10d99ae5c62382f2841bae629c09f45 (diff) | |
parent | a7da0dda39cf1e807eea1304b48d4583e7329b72 (diff) | |
download | frameworks_native-9913b9941ef90a98d826f3338c0a1ec3e4497b8c.zip frameworks_native-9913b9941ef90a98d826f3338c0a1ec3e4497b8c.tar.gz frameworks_native-9913b9941ef90a98d826f3338c0a1ec3e4497b8c.tar.bz2 |
am a7da0dda: am 98cbec81: am efd614b8: Merge "make transform hint multi-display aware" into jb-mr1.1-dev
* commit 'a7da0dda39cf1e807eea1304b48d4583e7329b72':
make transform hint multi-display aware
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index a8a2405..6bed20a 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -97,7 +97,8 @@ void Layer::onFirstRef() mSurfaceTexture->setDefaultMaxBufferCount(3); #endif - updateTransformHint(); + const sp<const DisplayDevice> hw(mFlinger->getDefaultDisplayDevice()); + updateTransformHint(hw); } Layer::~Layer() @@ -761,15 +762,12 @@ uint32_t Layer::getEffectiveUsage(uint32_t usage) const return usage; } -void Layer::updateTransformHint() const { +void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const { uint32_t orientation = 0; if (!mFlinger->mDebugDisableTransformHint) { - // The transform hint is used to improve performance on the main - // display -- we can only have a single transform hint, it cannot + // The transform hint is used to improve performance, but we can + // only have a single transform hint, it cannot // apply to all displays. - // This is why we use the default display here. This is not an - // oversight. - sp<const DisplayDevice> hw(mFlinger->getDefaultDisplayDevice()); const Transform& planeTransform(hw->getTransform()); orientation = planeTransform.getOrientation(); if (orientation & Transform::ROT_INVALID) { |