BlastBufferQueue: Add support for auto refresh

When BQ is in shared bufer mode, the client can request
the consumer to aquire frames as fast as possible before
waiting for a frame to be available. To support this for
BLAST, pass the state via a transaction.

Fixes: 168506187
Test: atest SurfaceViewBufferTests
Change-Id: I25ddd98671a08e56798612b7e5dc72095b2c4b7b
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 91f050c..4e398d3 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3796,6 +3796,9 @@
             flags |= eTraversalNeeded | eTransformHintUpdateNeeded;
         }
     }
+    if (what & layer_state_t::eAutoRefreshChanged) {
+        layer->setAutoRefresh(s.autoRefresh);
+    }
     // This has to happen after we reparent children because when we reparent to null we remove
     // child layers from current state and remove its relative z. If the children are reparented in
     // the same transaction, then we have to make sure we reparent the children first so we do not