drm_hwcomposer: Small refactor of ImportLayerBuffer
Move the fence dup into this helper function as well, making the output
of the function a HwcLayer::Buffer struct.
Change-Id: If18c9aa0b3e20d88bdca82e4ec375cb6f20205dd
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/hwc3/ComposerClient.h b/hwc3/ComposerClient.h
index 20d15b4..5938ceb 100644
--- a/hwc3/ComposerClient.h
+++ b/hwc3/ComposerClient.h
@@ -20,6 +20,7 @@
#include "aidl/android/hardware/graphics/composer3/BnComposerClient.h"
#include "aidl/android/hardware/graphics/composer3/LayerCommand.h"
+#include "hwc2_device/HwcLayer.h"
#include "hwc3/CommandResultWriter.h"
#include "hwc3/ComposerResources.h"
#include "hwc3/Utils.h"
@@ -29,10 +30,7 @@
using AidlNativeHandle = aidl::android::hardware::common::NativeHandle;
namespace android {
-
class HwcDisplay;
-class HwcLayer;
-
} // namespace android
namespace aidl::android::hardware::graphics::composer3::impl {
@@ -163,7 +161,7 @@
private:
hwc3::Error ImportLayerBuffer(int64_t display_id, int64_t layer_id,
const Buffer& buffer,
- buffer_handle_t* out_imported_buffer);
+ ::android::HwcLayer::Buffer* out_buffer);
// Layer commands
void DispatchLayerCommand(int64_t display_id, const LayerCommand& command);