Merge "give the proper orientation to the h/w composer HAL"
This commit is contained in:
committed by
Android (Google) Code Review
commit
eb031bb9dd
@@ -196,13 +196,12 @@ void Layer::setGeometry(hwc_layer_t* hwcl)
|
|||||||
* 1) buffer orientation/flip/mirror
|
* 1) buffer orientation/flip/mirror
|
||||||
* 2) state transformation (window manager)
|
* 2) state transformation (window manager)
|
||||||
* 3) layer orientation (screen orientation)
|
* 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)
|
* (NOTE: the matrices are multiplied in reverse order)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Transform bufferOrientation(mCurrentTransform);
|
const Transform bufferOrientation(mCurrentTransform);
|
||||||
const Transform layerOrientation(mOrientation);
|
const Transform tr(mTransform * bufferOrientation);
|
||||||
const Transform tr(layerOrientation * bufferOrientation);
|
|
||||||
|
|
||||||
// this gives us only the "orientation" component of the transform
|
// this gives us only the "orientation" component of the transform
|
||||||
const uint32_t finalTransform = tr.getOrientation();
|
const uint32_t finalTransform = tr.getOrientation();
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ void LayerBase::validateVisibility(const Transform& planeTransform)
|
|||||||
|
|
||||||
// cache a few things...
|
// cache a few things...
|
||||||
mOrientation = tr.getOrientation();
|
mOrientation = tr.getOrientation();
|
||||||
|
mTransform = tr;
|
||||||
mTransformedBounds = tr.makeBounds(w, h);
|
mTransformedBounds = tr.makeBounds(w, h);
|
||||||
mLeft = tr.tx();
|
mLeft = tr.tx();
|
||||||
mTop = tr.ty();
|
mTop = tr.ty();
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ private:
|
|||||||
protected:
|
protected:
|
||||||
// cached during validateVisibility()
|
// cached during validateVisibility()
|
||||||
int32_t mOrientation;
|
int32_t mOrientation;
|
||||||
|
Transform mTransform;
|
||||||
GLfloat mVertices[4][2];
|
GLfloat mVertices[4][2];
|
||||||
Rect mTransformedBounds;
|
Rect mTransformedBounds;
|
||||||
int mLeft;
|
int mLeft;
|
||||||
|
|||||||
Reference in New Issue
Block a user