summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-09-29 22:39:22 -0700
committerMathias Agopian <mathias@google.com>2009-09-29 22:44:28 -0700
commit7e4a587f6038bcf9b58ca615fce9e52fd47e30c3 (patch)
tree702cbd56ed6a468aeb2c3f590dd7824984e4cb38 /libs/surfaceflinger/Layer.cpp
parentba6be54876a19444f0b214b4b3b0749df227b013 (diff)
downloadframeworks_native-7e4a587f6038bcf9b58ca615fce9e52fd47e30c3.zip
frameworks_native-7e4a587f6038bcf9b58ca615fce9e52fd47e30c3.tar.gz
frameworks_native-7e4a587f6038bcf9b58ca615fce9e52fd47e30c3.tar.bz2
introduce the notion of the requested size in the Layer state
Diffstat (limited to 'libs/surfaceflinger/Layer.cpp')
-rw-r--r--libs/surfaceflinger/Layer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index 2894bf0..d59f205 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -294,8 +294,8 @@ sp<SurfaceBuffer> Layer::requestBuffer(int index, int usage)
this, index, w, h, strerror(-err));
} else {
LOGD_IF(DEBUG_RESIZE,
- "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d",
- this, index, w, h);
+ "Layer::requestBuffer(this=%p), index=%d, w=%d, h=%d, handle=%p",
+ this, index, w, h, buffer->handle);
}
if (err == NO_ERROR && buffer->handle != 0) {
@@ -318,21 +318,21 @@ uint32_t Layer::doTransaction(uint32_t flags)
const Layer::State& front(drawingState());
const Layer::State& temp(currentState());
- // Index of the back buffer
- const bool backbufferChanged = (front.w != temp.w) || (front.h != temp.h);
- if (backbufferChanged) {
+ if ((front.requested_w != temp.requested_w) ||
+ (front.requested_h != temp.requested_h)) {
// the size changed, we need to ask our client to request a new buffer
LOGD_IF(DEBUG_RESIZE,
"resize (layer=%p), requested (%dx%d), "
"drawing (%d,%d), (%dx%d), (%dx%d)",
- this, int(temp.w), int(temp.h),
- int(drawingState().w), int(drawingState().h),
+ this,
+ int(temp.requested_w), int(temp.requested_h),
+ int(front.requested_w), int(front.requested_h),
int(mBuffers[0]->getWidth()), int(mBuffers[0]->getHeight()),
int(mBuffers[1]->getWidth()), int(mBuffers[1]->getHeight()));
// record the new size, form this point on, when the client request a
// buffer, it'll get the new size.
- setDrawingSize(temp.w, temp.h);
+ setDrawingSize(temp.requested_w, temp.requested_h);
// we're being resized and there is a freeze display request,
// acquire a freeze lock, so that the screen stays put