summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-09-26 19:44:41 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-09-26 19:44:41 -0700
commitf3292716b758b51d3849b3eb021eb176e78ea720 (patch)
tree4b45f6efe4b5937a57bbb0380bf371bd9341680a /services/surfaceflinger
parenta7717750227ddd5829161a3e4476c1fb0de3d2ad (diff)
parent3780d38010f50ccce508871058d54c1921936e0c (diff)
downloadframeworks_base-f3292716b758b51d3849b3eb021eb176e78ea720.zip
frameworks_base-f3292716b758b51d3849b3eb021eb176e78ea720.tar.gz
frameworks_base-f3292716b758b51d3849b3eb021eb176e78ea720.tar.bz2
am 3780d380: Merge "SurfaceFlinger: fix the transform hint" into ics-factoryrom
* commit '3780d38010f50ccce508871058d54c1921936e0c': SurfaceFlinger: fix the transform hint
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r--services/surfaceflinger/Layer.cpp2
-rw-r--r--services/surfaceflinger/LayerBase.cpp2
-rw-r--r--services/surfaceflinger/LayerBase.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index f85ce7f..49d2c55 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -578,7 +578,7 @@ uint32_t Layer::getEffectiveUsage(uint32_t usage) const
uint32_t Layer::getTransformHint() const {
uint32_t orientation = 0;
if (!mFlinger->mDebugDisableTransformHint) {
- orientation = getOrientation();
+ orientation = getPlaneOrientation();
if (orientation & Transform::ROT_INVALID) {
orientation = 0;
}
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index e5ce814..7a47f62 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -45,6 +45,7 @@ LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display)
mFlinger(flinger), mFiltering(false),
mNeedsFiltering(false), mInOverlay(false),
mOrientation(0),
+ mPlaneOrientation(0),
mTransactionFlags(0),
mPremultipliedAlpha(true), mName("unnamed"), mDebug(false),
mInvalidate(0)
@@ -256,6 +257,7 @@ void LayerBase::validateVisibility(const Transform& planeTransform)
// cache a few things...
mOrientation = tr.getOrientation();
+ mPlaneOrientation = planeTransform.getOrientation();
mTransform = tr;
mTransformedBounds = tr.makeBounds(w, h);
}
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index a14b397..268ba2d 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -221,6 +221,7 @@ public:
inline State& currentState() { return mCurrentState; }
int32_t getOrientation() const { return mOrientation; }
+ int32_t getPlaneOrientation() const { return mPlaneOrientation; }
protected:
const GraphicPlane& graphicPlane(int dpy) const;
@@ -254,6 +255,7 @@ private:
protected:
// cached during validateVisibility()
int32_t mOrientation;
+ int32_t mPlaneOrientation;
Transform mTransform;
GLfloat mVertices[4][2];
Rect mTransformedBounds;