summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2011-08-18 21:05:51 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-08-18 21:05:51 -0700
commiteb031bb9dd35fb136c19cc1e00e82aade16ebd52 (patch)
tree2fc3f30bcf5590086e83e0b307dbc36c6f5912ff
parent54f655389a1250aa6835259fa8c97446fd938d0c (diff)
parent3f88327a54a919cf853098c97e7db085d50b91e0 (diff)
Merge "give the proper orientation to the h/w composer HAL"
-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 64eaecc86bbf..19c7ddd4fbab 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 7bf73d9aeeb1..4cc245a11076 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 a3d36444bc16..2cd3a9435e91 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;