OSDN Git Service

Revert "Death to synchronous transactions (1/2)"
authorJorim Jaggi <jjaggi@google.com>
Wed, 13 Apr 2016 01:40:35 +0000 (01:40 +0000)
committerJorim Jaggi <jjaggi@google.com>
Wed, 13 Apr 2016 01:43:21 +0000 (01:43 +0000)
This reverts commit c6a607aa7ab96f6b1bac487cffd1899e1f1cdcf5.

It causes issues when resizing: default buffer size on the consumer side
only gets set when the transaction actually executes. But because
consumer is not blocked on SF over WM anymore, it gets the default
buffer size before the surface is resized, and thus uses wrong bounds
for the buffer to be drawn, and never submits another one.

This needs a more involved fix.

Bug: 28122036
Bug: 28128613
Change-Id: I0e738f99e43fc9ea25426e9e6e607e01413d3bb7

libs/gui/SurfaceComposerClient.cpp

index f031296..418892a 100644 (file)
@@ -291,6 +291,9 @@ status_t Composer::setSize(const sp<SurfaceComposerClient>& client,
     s->w = w;
     s->h = h;
 
+    // Resizing a surface makes the transaction synchronous.
+    mForceSynchronous = true;
+
     return NO_ERROR;
 }
 
@@ -451,6 +454,7 @@ void Composer::setDisplayProjection(const sp<IBinder>& token,
     s.viewport = layerStackRect;
     s.frame = displayRect;
     s.what |= DisplayState::eDisplayProjectionChanged;
+    mForceSynchronous = true; // TODO: do we actually still need this?
 }
 
 void Composer::setDisplaySize(const sp<IBinder>& token, uint32_t width, uint32_t height) {