drm_hwcomposer: Move include/drmhwcgralloc.h to bufferinfo/BufferInfo.h
... to emphasize its purpose.
- Rename struct HwcDrmBo -> struct BufferInfo
- Remove unused BufferInfo::acquire_fence, BufferInfo::hal_format and
BufferInfo::usage fields
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmFbImporter.cpp b/drm/DrmFbImporter.cpp
index f82d674..585b789 100644
--- a/drm/DrmFbImporter.cpp
+++ b/drm/DrmFbImporter.cpp
@@ -34,7 +34,7 @@
namespace android {
-auto DrmFbIdHandle::CreateInstance(hwc_drm_bo_t *bo, GemHandle first_gem_handle,
+auto DrmFbIdHandle::CreateInstance(BufferInfo *bo, GemHandle first_gem_handle,
DrmDevice &drm)
-> std::shared_ptr<DrmFbIdHandle> {
ATRACE_NAME("Import dmabufs and register FB");
@@ -123,7 +123,7 @@
}
}
-auto DrmFbImporter::GetOrCreateFbId(hwc_drm_bo_t *bo)
+auto DrmFbImporter::GetOrCreateFbId(BufferInfo *bo)
-> std::shared_ptr<DrmFbIdHandle> {
/* Lookup DrmFbIdHandle in cache first. First handle serves as a cache key. */
GemHandle first_handle = 0;
diff --git a/drm/DrmFbImporter.h b/drm/DrmFbImporter.h
index 7f17bbe..9e94238 100644
--- a/drm/DrmFbImporter.h
+++ b/drm/DrmFbImporter.h
@@ -23,8 +23,8 @@
#include <array>
#include <map>
+#include "bufferinfo/BufferInfo.h"
#include "drm/DrmDevice.h"
-#include "drmhwcgralloc.h"
#ifndef DRM_FORMAT_INVALID
#define DRM_FORMAT_INVALID 0
@@ -36,7 +36,7 @@
class DrmFbIdHandle {
public:
- static auto CreateInstance(hwc_drm_bo_t *bo, GemHandle first_gem_handle,
+ static auto CreateInstance(BufferInfo *bo, GemHandle first_gem_handle,
DrmDevice &drm) -> std::shared_ptr<DrmFbIdHandle>;
~DrmFbIdHandle();
@@ -55,7 +55,7 @@
DrmDevice *const drm_;
uint32_t fb_id_{};
- std::array<GemHandle, kHwcDrmBoMaxPlanes> gem_handles_{};
+ std::array<GemHandle, kBufferMaxPlanes> gem_handles_{};
};
class DrmFbImporter {
@@ -67,7 +67,7 @@
auto operator=(const DrmFbImporter &) = delete;
auto operator=(DrmFbImporter &&) = delete;
- auto GetOrCreateFbId(hwc_drm_bo_t *bo) -> std::shared_ptr<DrmFbIdHandle>;
+ auto GetOrCreateFbId(BufferInfo *bo) -> std::shared_ptr<DrmFbIdHandle>;
private:
void CleanupEmptyCacheElements() {