summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-08-18 18:31:00 -0700
committerMathias Agopian <mathias@google.com>2011-08-18 18:33:44 -0700
commitd992db3827016388e8069f5793b031153d423501 (patch)
treed3500a1e394f13589343589f1c0d6111a381f68c /services
parent9509b9ce60d1919a3cf1bd7e66dd39183cb488a0 (diff)
downloadframeworks_native-d992db3827016388e8069f5793b031153d423501.zip
frameworks_native-d992db3827016388e8069f5793b031153d423501.tar.gz
frameworks_native-d992db3827016388e8069f5793b031153d423501.tar.bz2
give the proper orientation to the h/w composer HAL
we were using the "orientation" value instead of the real transform, which may contain arbitrary rotations for instance, and in some case ended up with a final "orientation" that looked valid, but wasn't. this fixes a problem on devices with a h/w composer hal where the rotation animation looked weird. Change-Id: I4be8a2a1bde49c33456fcf5c8d87ab515c216763
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/Layer.cpp5
-rw-r--r--services/surfaceflinger/LayerBase.cpp1
-rw-r--r--services/surfaceflinger/LayerBase.h1
3 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 64eaecc..19c7ddd 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -196,13 +196,12 @@ void Layer::setGeometry(hwc_layer_t* hwcl)
* 1) buffer orientation/flip/mirror
* 2) state transformation (window manager)
* 3) layer orientation (screen orientation)
- * mOrientation is already the composition of (2) and (3)
+ * mTransform is already the composition of (2) and (3)
* (NOTE: the matrices are multiplied in reverse order)
*/
const Transform bufferOrientation(mCurrentTransform);
- const Transform layerOrientation(mOrientation);
- const Transform tr(layerOrientation * bufferOrientation);
+ const Transform tr(mTransform * bufferOrientation);
// this gives us only the "orientation" component of the transform
const uint32_t finalTransform = tr.getOrientation();
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index 7bf73d9..4cc245a 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -257,6 +257,7 @@ void LayerBase::validateVisibility(const Transform& planeTransform)
// cache a few things...
mOrientation = tr.getOrientation();
+ mTransform = tr;
mTransformedBounds = tr.makeBounds(w, h);
mLeft = tr.tx();
mTop = tr.ty();
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index a3d3644..2cd3a94 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -247,6 +247,7 @@ private:
protected:
// cached during validateVisibility()
int32_t mOrientation;
+ Transform mTransform;
GLfloat mVertices[4][2];
Rect mTransformedBounds;
int mLeft;