BufferHub: Clean up unnecessary DVR dependency
As we are upstreaming BufferHub to Android maintain, let's make sure
there is no unnecessary dependency on DVR.
Bug: 70046255
Test: buffer_hub-test, buffer_hub_queue-test
Change-Id: Idc3cb30c9629374ebbc94d6ff095447dc02928d5
diff --git a/libs/vr/libbufferhub/Android.bp b/libs/vr/libbufferhub/Android.bp
index 9481c37..fa8e565 100644
--- a/libs/vr/libbufferhub/Android.bp
+++ b/libs/vr/libbufferhub/Android.bp
@@ -23,7 +23,6 @@
]
staticLibraries = [
- "libdvrcommon",
"libpdx_default_transport",
]
diff --git a/libs/vr/libbufferhubqueue/Android.bp b/libs/vr/libbufferhubqueue/Android.bp
index 8241809..b9568ee 100644
--- a/libs/vr/libbufferhubqueue/Android.bp
+++ b/libs/vr/libbufferhubqueue/Android.bp
@@ -24,7 +24,6 @@
staticLibraries = [
"libbufferhub",
- "libdvrcommon",
"libpdx_default_transport",
]
diff --git a/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_client.h b/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_client.h
index 5b320a4..5bab4a5 100644
--- a/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_client.h
+++ b/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_client.h
@@ -9,7 +9,6 @@
#include <private/dvr/buffer_hub_queue_parcelable.h>
#include <private/dvr/bufferhub_rpc.h>
#include <private/dvr/epoll_file_descriptor.h>
-#include <private/dvr/ring_buffer.h>
#include <memory>
#include <queue>
@@ -157,7 +156,7 @@
int poll_events);
pdx::Status<void> HandleQueueEvent(int poll_events);
- // Entry in the ring buffer of available buffers that stores related
+ // Entry in the priority queue of available buffers that stores related
// per-buffer data.
struct Entry {
Entry() : slot(0) {}
@@ -242,7 +241,6 @@
std::array<std::shared_ptr<BufferHubBuffer>, kMaxQueueCapacity> buffers_;
// Buffers and related data that are available for dequeue.
- // RingBuffer<Entry> available_buffers_{kMaxQueueCapacity};
std::priority_queue<Entry, std::vector<Entry>, EntryComparator>
available_buffers_;
diff --git a/libs/vr/libdvrcommon/include/private/dvr/epoll_file_descriptor.h b/libs/vr/libbufferhubqueue/include/private/dvr/epoll_file_descriptor.h
similarity index 84%
rename from libs/vr/libdvrcommon/include/private/dvr/epoll_file_descriptor.h
rename to libs/vr/libbufferhubqueue/include/private/dvr/epoll_file_descriptor.h
index 099a409..6e303a5 100644
--- a/libs/vr/libdvrcommon/include/private/dvr/epoll_file_descriptor.h
+++ b/libs/vr/libbufferhubqueue/include/private/dvr/epoll_file_descriptor.h
@@ -1,5 +1,5 @@
-#ifndef LIBS_VR_LIBDVRCOMMON_INCLUDE_PRIVATE_DVR_EPOLL_FILE_DESCRIPTOR_H_
-#define LIBS_VR_LIBDVRCOMMON_INCLUDE_PRIVATE_DVR_EPOLL_FILE_DESCRIPTOR_H_
+#ifndef ANDROID_DVR_EPOLL_FILE_DESCRIPTOR_H_
+#define ANDROID_DVR_EPOLL_FILE_DESCRIPTOR_H_
#include <android-base/unique_fd.h>
#include <log/log.h>
@@ -61,4 +61,4 @@
} // namespace dvr
} // namespace android
-#endif // LIBS_VR_LIBDVRCOMMON_INCLUDE_PRIVATE_DVR_EPOLL_FILE_DESCRIPTOR_H_
+#endif // ANDROID_DVR_EPOLL_FILE_DESCRIPTOR_H_