From 1501d54d63c55dc4e8f4c6eeaeac35aca6660ffc Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 4 Sep 2012 21:04:09 -0700 Subject: [PATCH] minor cleanup Change-Id: Ied80e14878e92a506930f7a5a55adde8f260ec70 --- services/surfaceflinger/SurfaceFlinger.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f6dd62ad7..08cb345d0 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1027,10 +1027,10 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) // TODO: we could traverse the tree from front to back and // compute the actual visible region // TODO: we could cache the transformed region - Layer::State front(layer->drawingState()); - Region visibleReg = front.transform.transform( - Region(Rect(front.active.w, front.active.h))); - invalidateLayerStack(front.layerStack, visibleReg); + const Layer::State& s(layer->drawingState()); + Region visibleReg = s.transform.transform( + Region(Rect(s.active.w, s.active.h))); + invalidateLayerStack(s.layerStack, visibleReg); } } } @@ -1202,7 +1202,7 @@ void SurfaceFlinger::handlePageFlip() for (size_t i=0 ; i& layer(currentLayers[i]); const Region dirty(layer->latchBuffer(visibleRegions)); - Layer::State s(layer->drawingState()); + const Layer::State& s(layer->drawingState()); invalidateLayerStack(s.layerStack, dirty); }