Merge change 8817 into donut
* changes: fix [2017532] Partial Update leaves residual image.
This commit is contained in:
@ -691,9 +691,14 @@ void SurfaceFlinger::handleTransaction(uint32_t transactionFlags)
|
||||
|
||||
// some layers might have been removed, so
|
||||
// we need to update the regions they're exposing.
|
||||
size_t c = mRemovedLayers.size();
|
||||
const SortedVector<LayerBase*>& removedLayers(mRemovedLayers);
|
||||
size_t c = removedLayers.size();
|
||||
if (c) {
|
||||
mVisibleRegionsDirty = true;
|
||||
while (c--) {
|
||||
mDirtyRegionRemovedLayer.orSelf(
|
||||
removedLayers[c]->visibleRegionScreen);
|
||||
}
|
||||
}
|
||||
|
||||
const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
|
||||
@ -733,17 +738,15 @@ void SurfaceFlinger::computeVisibleRegions(
|
||||
layer->validateVisibility(planeTransform);
|
||||
|
||||
// start with the whole surface at its current location
|
||||
const Layer::State& s = layer->drawingState();
|
||||
const Rect bounds(layer->visibleBounds());
|
||||
const Layer::State& s(layer->drawingState());
|
||||
|
||||
// handle hidden surfaces by setting the visible region to empty
|
||||
Region opaqueRegion;
|
||||
Region visibleRegion;
|
||||
Region coveredRegion;
|
||||
if (UNLIKELY((s.flags & ISurfaceComposer::eLayerHidden) || !s.alpha)) {
|
||||
visibleRegion.clear();
|
||||
} else {
|
||||
if (LIKELY(!(s.flags & ISurfaceComposer::eLayerHidden) && s.alpha)) {
|
||||
const bool translucent = layer->needsBlending();
|
||||
const Rect bounds(layer->visibleBounds());
|
||||
visibleRegion.set(bounds);
|
||||
coveredRegion = visibleRegion;
|
||||
|
||||
@ -790,12 +793,16 @@ void SurfaceFlinger::computeVisibleRegions(
|
||||
layer->setVisibleRegion(visibleRegion);
|
||||
layer->setCoveredRegion(coveredRegion);
|
||||
|
||||
// If a secure layer is partially visible, lockdown the screen!
|
||||
// If a secure layer is partially visible, lock-down the screen!
|
||||
if (layer->isSecure() && !visibleRegion.isEmpty()) {
|
||||
secureFrameBuffer = true;
|
||||
}
|
||||
}
|
||||
|
||||
// invalidate the areas where a layer was removed
|
||||
dirtyRegion.orSelf(mDirtyRegionRemovedLayer);
|
||||
mDirtyRegionRemovedLayer.clear();
|
||||
|
||||
mSecureFrameBuffer = secureFrameBuffer;
|
||||
opaqueRegion = aboveOpaqueLayers;
|
||||
}
|
||||
|
@ -351,6 +351,7 @@ private:
|
||||
// Can only accessed from the main thread, these members
|
||||
// don't need synchronization
|
||||
Region mDirtyRegion;
|
||||
Region mDirtyRegionRemovedLayer;
|
||||
Region mInvalidRegion;
|
||||
Region mWormholeRegion;
|
||||
Client* mLastScheduledBroadcast;
|
||||
|
Reference in New Issue
Block a user