SurfaceFlinger: correctly pass desired present time for BLAST
Pass whether a desired present time is automatically
populated or not to match BufferStateLayer behavior to the one
we have for BufferQueueLayer.
Bug: 169901895
Test: expand notification shade and observe systrace
Change-Id: Ia02c5633d46dde67d2c3be33b084d63c40c2afb0
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 405658b..a8d6832 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -71,7 +71,7 @@
virtual status_t setTransactionState(
int64_t frameTimelineVsyncId, const Vector<ComposerState>& state,
const Vector<DisplayState>& displays, uint32_t flags, const sp<IBinder>& applyToken,
- const InputWindowCommands& commands, int64_t desiredPresentTime,
+ const InputWindowCommands& commands, int64_t desiredPresentTime, bool isAutoTimestamp,
const client_cache_t& uncacheBuffer, bool hasListenerCallbacks,
const std::vector<ListenerCallbacks>& listenerCallbacks, uint64_t transactionId) {
Parcel data, reply;
@@ -92,6 +92,7 @@
SAFE_PARCEL(data.writeStrongBinder, applyToken);
SAFE_PARCEL(commands.write, data);
SAFE_PARCEL(data.writeInt64, desiredPresentTime);
+ SAFE_PARCEL(data.writeBool, isAutoTimestamp);
SAFE_PARCEL(data.writeStrongBinder, uncacheBuffer.token.promote());
SAFE_PARCEL(data.writeUint64, uncacheBuffer.id);
SAFE_PARCEL(data.writeBool, hasListenerCallbacks);
@@ -1297,7 +1298,9 @@
SAFE_PARCEL(inputWindowCommands.read, data);
int64_t desiredPresentTime = 0;
+ bool isAutoTimestamp = true;
SAFE_PARCEL(data.readInt64, &desiredPresentTime);
+ SAFE_PARCEL(data.readBool, &isAutoTimestamp);
client_cache_t uncachedBuffer;
sp<IBinder> tmpBinder;
@@ -1323,8 +1326,8 @@
return setTransactionState(frameTimelineVsyncId, state, displays, stateFlags,
applyToken, inputWindowCommands, desiredPresentTime,
- uncachedBuffer, hasListenerCallbacks, listenerCallbacks,
- transactionId);
+ isAutoTimestamp, uncachedBuffer, hasListenerCallbacks,
+ listenerCallbacks, transactionId);
}
case BOOT_FINISHED: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);