summaryrefslogtreecommitdiff
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
author Marissa Wall <marissaw@google.com> 2019-03-29 14:03:53 -0700
committer Valerie Hau <vhau@google.com> 2019-04-16 15:39:28 -0700
commit947d34ecad84bdaf496748eeb9f6e35b33deb339 (patch)
tree29f668d1d193b97ab93d74b0d4cdc7b0bd239c3f /libs/gui/ISurfaceComposer.cpp
parent1688f5246f156e815bd7b07ba7d5c39cc821e8d6 (diff)
Change slot generation for BufferState
BufferState layers now do slot generation with buffer death considered appropriately. When a buffer dies, the slot will be pushed onto a stack of available slots to be reused at the next opportunity. This should mimic BufferQueue slot behavior and prevent Composer Resources from growing too large. Test: build, boot, manual Bug: 129351223 Change-Id: Icef9592593cacb0b5c6b12f6679fc2c4dabdcd19
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r--libs/gui/ISurfaceComposer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index a3165ddb9e..a8b1a4c7af 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -69,7 +69,7 @@ public:
const sp<IBinder>& applyToken,
const InputWindowCommands& commands,
int64_t desiredPresentTime,
- const cached_buffer_t& uncacheBuffer,
+ const client_cache_t& uncacheBuffer,
const std::vector<ListenerCallbacks>& listenerCallbacks) {
Parcel data, reply;
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
@@ -88,8 +88,8 @@ public:
data.writeStrongBinder(applyToken);
commands.write(data);
data.writeInt64(desiredPresentTime);
- data.writeStrongBinder(uncacheBuffer.token);
- data.writeUint64(uncacheBuffer.cacheId);
+ data.writeWeakBinder(uncacheBuffer.token);
+ data.writeUint64(uncacheBuffer.id);
if (data.writeVectorSize(listenerCallbacks) == NO_ERROR) {
for (const auto& [listener, callbackIds] : listenerCallbacks) {
@@ -991,9 +991,9 @@ status_t BnSurfaceComposer::onTransact(
int64_t desiredPresentTime = data.readInt64();
- cached_buffer_t uncachedBuffer;
- uncachedBuffer.token = data.readStrongBinder();
- uncachedBuffer.cacheId = data.readUint64();
+ client_cache_t uncachedBuffer;
+ uncachedBuffer.token = data.readWeakBinder();
+ uncachedBuffer.id = data.readUint64();
std::vector<ListenerCallbacks> listenerCallbacks;
int32_t listenersSize = data.readInt32();