Skip to content

Commit 3780d38

Browse files
Jamie GennisAndroid (Google) Code Review
authored andcommitted
Merge "SurfaceFlinger: fix the transform hint" into ics-factoryrom
2 parents 622abb7 + fd2429d commit 3780d38

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

services/surfaceflinger/Layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ uint32_t Layer::getEffectiveUsage(uint32_t usage) const
578578
uint32_t Layer::getTransformHint() const {
579579
uint32_t orientation = 0;
580580
if (!mFlinger->mDebugDisableTransformHint) {
581-
orientation = getOrientation();
581+
orientation = getPlaneOrientation();
582582
if (orientation & Transform::ROT_INVALID) {
583583
orientation = 0;
584584
}

services/surfaceflinger/LayerBase.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display)
4545
mFlinger(flinger), mFiltering(false),
4646
mNeedsFiltering(false), mInOverlay(false),
4747
mOrientation(0),
48+
mPlaneOrientation(0),
4849
mTransactionFlags(0),
4950
mPremultipliedAlpha(true), mName("unnamed"), mDebug(false),
5051
mInvalidate(0)
@@ -256,6 +257,7 @@ void LayerBase::validateVisibility(const Transform& planeTransform)
256257

257258
// cache a few things...
258259
mOrientation = tr.getOrientation();
260+
mPlaneOrientation = planeTransform.getOrientation();
259261
mTransform = tr;
260262
mTransformedBounds = tr.makeBounds(w, h);
261263
}

services/surfaceflinger/LayerBase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class LayerBase : public RefBase
221221
inline State& currentState() { return mCurrentState; }
222222

223223
int32_t getOrientation() const { return mOrientation; }
224+
int32_t getPlaneOrientation() const { return mPlaneOrientation; }
224225

225226
protected:
226227
const GraphicPlane& graphicPlane(int dpy) const;
@@ -254,6 +255,7 @@ class LayerBase : public RefBase
254255
protected:
255256
// cached during validateVisibility()
256257
int32_t mOrientation;
258+
int32_t mPlaneOrientation;
257259
Transform mTransform;
258260
GLfloat mVertices[4][2];
259261
Rect mTransformedBounds;

0 commit comments

Comments
 (0)