Reset mFreezePositionUpdates earlier.
We are resetting mFreezePositionUpdates
too late, in the case that the state changes during
latch buffer, we will return to recompute the visible regions
before updating mActiveBuffer.
Bug: 28823590
Change-Id: I17afc32d55d092ea0814b560846b922dd9e24c43
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index f67e66e..c30f1bb 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1773,16 +1773,19 @@
bool stickyTransformSet;
const char* name;
int32_t overrideScalingMode;
+ bool& freezePositionUpdates;
Reject(Layer::State& front, Layer::State& current,
bool& recomputeVisibleRegions, bool stickySet,
const char* name,
- int32_t overrideScalingMode)
+ int32_t overrideScalingMode,
+ bool& freezePositionUpdates)
: front(front), current(current),
recomputeVisibleRegions(recomputeVisibleRegions),
stickyTransformSet(stickySet),
name(name),
- overrideScalingMode(overrideScalingMode) {
+ overrideScalingMode(overrideScalingMode),
+ freezePositionUpdates(freezePositionUpdates) {
}
virtual bool reject(const sp<GraphicBuffer>& buf,
@@ -1879,6 +1882,7 @@
current.crop = front.requestedCrop;
recomputeVisibleRegions = true;
}
+ freezePositionUpdates = false;
return false;
}
@@ -1886,7 +1890,7 @@
Reject r(mDrawingState, getCurrentState(), recomputeVisibleRegions,
getProducerStickyTransform() != 0, mName.string(),
- mOverrideScalingMode);
+ mOverrideScalingMode, mFreezePositionUpdates);
// Check all of our local sync points to ensure that all transactions
@@ -2029,7 +2033,6 @@
if (bufWidth != uint32_t(oldActiveBuffer->width) ||
bufHeight != uint32_t(oldActiveBuffer->height)) {
recomputeVisibleRegions = true;
- mFreezePositionUpdates = false;
}
}