summaryrefslogtreecommitdiff
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2021-02-09 22:28:39 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-02-09 22:28:39 +0000
commitd486b821b2534d73fcdb33c0456f441fd9b6f6f3 (patch)
tree06c605fe6fe4792e199543cee2397c25a5259a65 /libs/gui/ISurfaceComposer.cpp
parent42c3aefc765bc1aba9aad9be0cd2afa1c33862f3 (diff)
parent564f9deb6d5c9ee27bd6a84f7c6e4544ad9e174a (diff)
Merge "SurfaceFlinger: expose vsync id extra buffers" into sc-dev
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r--libs/gui/ISurfaceComposer.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 10d48a35bf..762746c0ce 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -1235,6 +1235,18 @@ public:
}
return reply.readInt32();
}
+
+ status_t getExtraBufferCount(int* extraBuffers) const override {
+ Parcel data, reply;
+ data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+ status_t err = remote()->transact(BnSurfaceComposer::GET_EXTRA_BUFFER_COUNT, data, &reply);
+ if (err != NO_ERROR) {
+ ALOGE("getExtraBufferCount failed to read data: %s (%d)", strerror(-err), err);
+ return err;
+ }
+
+ return reply.readInt32(extraBuffers);
+ }
};
// Out-of-line virtual method definition to trigger vtable emission in this
@@ -2107,6 +2119,16 @@ status_t BnSurfaceComposer::onTransact(
SAFE_PARCEL(reply->writeInt32, priority);
return NO_ERROR;
}
+ case GET_EXTRA_BUFFER_COUNT: {
+ CHECK_INTERFACE(ISurfaceComposer, data, reply);
+ int extraBuffers = 0;
+ int err = getExtraBufferCount(&extraBuffers);
+ if (err != NO_ERROR) {
+ return err;
+ }
+ SAFE_PARCEL(reply->writeInt32, extraBuffers);
+ return NO_ERROR;
+ }
default: {
return BBinder::onTransact(code, data, reply, flags);
}