diff options
author | Mathias Agopian <mathias@google.com> | 2009-07-28 14:20:21 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-07-28 14:20:21 -0700 |
commit | 5d7126b625c8c4a7b945e8c247b63abff7bc13b6 (patch) | |
tree | 74ae309408f4e1e7916cbeba037a87d7da62ecd3 /libs | |
parent | 5fb9d7d1c168be17573f805615021280e0839f11 (diff) | |
parent | 792561dab0733bea46e5de58c03640bfb14869fd (diff) | |
download | frameworks_native-5d7126b625c8c4a7b945e8c247b63abff7bc13b6.zip frameworks_native-5d7126b625c8c4a7b945e8c247b63abff7bc13b6.tar.gz frameworks_native-5d7126b625c8c4a7b945e8c247b63abff7bc13b6.tar.bz2 |
resolved conflicts for merge of ac38dfc5 to master
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger/SurfaceFlinger.cpp | 15 | ||||
-rw-r--r-- | libs/surfaceflinger/SurfaceFlinger.h | 1 |
2 files changed, 10 insertions, 6 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index 7a7574f..102899c 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -650,6 +650,7 @@ void SurfaceFlinger::handleTransactionLocked( if (currentLayers.indexOf( layer ) < 0) { // this layer is not visible anymore ditchedLayers.add(layer); + mDirtyRegionRemovedLayer.orSelf(layer->visibleRegionScreen); } } } @@ -685,17 +686,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; @@ -742,12 +741,16 @@ void SurfaceFlinger::computeVisibleRegions( layer->setVisibleRegion(visibleRegion); layer->setCoveredRegion(coveredRegion); - // If a secure layer is partially visible, lock down 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; } diff --git a/libs/surfaceflinger/SurfaceFlinger.h b/libs/surfaceflinger/SurfaceFlinger.h index e8687a7..2569a0f 100644 --- a/libs/surfaceflinger/SurfaceFlinger.h +++ b/libs/surfaceflinger/SurfaceFlinger.h @@ -334,6 +334,7 @@ private: // Can only accessed from the main thread, these members // don't need synchronization Region mDirtyRegion; + Region mDirtyRegionRemovedLayer; Region mInvalidRegion; Region mWormholeRegion; wp<Client> mLastScheduledBroadcast; |