summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-05-23 14:35:49 -0700
committerMathias Agopian <mathias@google.com>2012-05-23 18:01:24 -0700
commit05cec9d1275fd939c2d1aec235dca2bdb8edef63 (patch)
tree8e444d605f3f8f8ef0ed1d4297045410d45e1367 /services/surfaceflinger/Layer.cpp
parent419e196e639c8adb875da2765abcef95017b6d4a (diff)
downloadframeworks_native-05cec9d1275fd939c2d1aec235dca2bdb8edef63.zip
frameworks_native-05cec9d1275fd939c2d1aec235dca2bdb8edef63.tar.gz
frameworks_native-05cec9d1275fd939c2d1aec235dca2bdb8edef63.tar.bz2
improve resize transactions
use a flag instead of pre-committing the "requested" state to prevent propagation or "requested" to "active", which makes things a lot clearer when reading the code. also avoid going through the "resized" code-path when requested size is equal to "active" size. Bug: 6498869 Change-Id: I24f893ba0ec5ca06aac5b8da9818989ae7ce4005
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index fc7c767..722813d 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -428,8 +428,8 @@ uint32_t Layer::doTransaction(uint32_t flags)
const Layer::State& front(drawingState());
const Layer::State& temp(currentState());
- const bool sizeChanged = (front.requested.w != temp.requested.w) ||
- (front.requested.h != temp.requested.h);
+ const bool sizeChanged = (temp.requested.w != front.active.w) ||
+ (temp.requested.h != front.active.h);
if (sizeChanged) {
// the size changed, we need to ask our client to request a new buffer
@@ -472,8 +472,7 @@ uint32_t Layer::doTransaction(uint32_t flags)
if (!isFixedSize()) {
// this will make sure LayerBase::doTransaction doesn't update
// the drawing state's geometry
- Layer::State& editDraw(mDrawingState);
- editDraw.requested = temp.requested;
+ flags |= eDontUpdateGeometryState;
}
// record the new size, form this point on, when the client request