From 9e9b0445544f11fdbf21a29601567af2d1819a30 Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Wed, 22 Apr 2015 14:59:08 -0700 Subject: SF: Always perform sideband transactions On normal Layers, we defer applying resize transactions until a buffer of the correct size arrives. This breaks with sideband streams, because buffers are not seen by SurfaceFlinger. This change applies transactions immediately for Layers which have a sideband stream attached to avoid that problem. Bug: 20428254 Change-Id: I379d8aaef460d467cdf8432764b4a504928fb65a (cherry picked from commit c300b8b506536e1bf94ffd8a3b75d46e776923e0) --- services/surfaceflinger/Layer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 7bb7529..2944c63 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -918,7 +918,7 @@ uint32_t Layer::doTransaction(uint32_t flags) { const bool resizePending = (c.requested.w != c.active.w) || (c.requested.h != c.active.h); - if (resizePending) { + if (resizePending && mSidebandStream == NULL) { // don't let Layer::doTransaction update the drawing state // if we have a pending resize, unless we are in fixed-size mode. // the drawing state will be updated only once we receive a buffer @@ -927,6 +927,10 @@ uint32_t Layer::doTransaction(uint32_t flags) { // in particular, we want to make sure the clip (which is part // of the geometry state) is latched together with the size but is // latched immediately when no resizing is involved. + // + // If a sideband stream is attached, however, we want to skip this + // optimization so that transactions aren't missed when a buffer + // never arrives flags |= eDontUpdateGeometryState; } -- cgit v1.1