drm_hwcomposer: Use shared pointer type for the pipeline_ variable

The change will help with resource management in further patches.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/hwc2_device/HwcDisplay.cpp b/hwc2_device/HwcDisplay.cpp
index efd8c14..4ef98c3 100644
--- a/hwc2_device/HwcDisplay.cpp
+++ b/hwc2_device/HwcDisplay.cpp
@@ -83,12 +83,12 @@
 
 HwcDisplay::~HwcDisplay() = default;
 
-void HwcDisplay::SetPipeline(DrmDisplayPipeline *pipeline) {
+void HwcDisplay::SetPipeline(std::shared_ptr<DrmDisplayPipeline> pipeline) {
   Deinit();
 
-  pipeline_ = pipeline;
+  pipeline_ = std::move(pipeline);
 
-  if (pipeline != nullptr || handle_ == kPrimaryDisplay) {
+  if (pipeline_ != nullptr || handle_ == kPrimaryDisplay) {
     Init();
     hwc2_->ScheduleHotplugEvent(handle_, /*connected = */ true);
   } else {