bufferhubd: Implement more DetachedBuffer logic
1/ Separate DetachedBuffer related logic into a dedicated subclass of
BufferHubRPC. This actually is the right thing to do as it utilizes
the PDX's client/service programming pattern better.
2/ Add IsValid() check for the DetachedBufferChannel object.
3/ Add BufferHubClient to handle general PDX operations.
4/ Add DetachedBuffer which composites a BufferHubClient.
5/ Fully functional logic of allocating a DetachedBuffer, converting it
to a BufferHub-backed GraphicBuffer, then converting it back to a
DetachedBuffer.
Bug: 38137191
Bug: 70046255
Bug: 70912269
Test: buffer_hub-test
Change-Id: I81bf9259cbbaeb29a6df2769363b5a03464e7864
diff --git a/libs/vr/libpdx/client.cpp b/libs/vr/libpdx/client.cpp
index a01c4d6..3c66a40 100644
--- a/libs/vr/libpdx/client.cpp
+++ b/libs/vr/libpdx/client.cpp
@@ -119,6 +119,10 @@
return channel_->GetChannelHandle();
}
+const LocalChannelHandle& Client::GetChannelHandle() const {
+ return channel_->GetChannelHandle();
+}
+
///////////////////////////// Transaction implementation //////////////////////
Transaction::Transaction(Client& client) : client_{client} {}