X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=drm%2FDrmFbImporter.h;h=7f17bbe625d682d3f43755210ef6689a02870dd1;hb=7d89911c;hp=efeb4574984d996f0a144232b8141b1da28eef27;hpb=650299a235ba82cafceef114d552ff4067ffbf1e;p=android-x86%2Fexternal-drm_hwcomposer.git diff --git a/drm/DrmFbImporter.h b/drm/DrmFbImporter.h index efeb457..7f17bbe 100644 --- a/drm/DrmFbImporter.h +++ b/drm/DrmFbImporter.h @@ -37,8 +37,7 @@ namespace android { class DrmFbIdHandle { public: static auto CreateInstance(hwc_drm_bo_t *bo, GemHandle first_gem_handle, - const std::shared_ptr &drm) - -> std::shared_ptr; + DrmDevice &drm) -> std::shared_ptr; ~DrmFbIdHandle(); DrmFbIdHandle(DrmFbIdHandle &&) = delete; @@ -51,10 +50,9 @@ class DrmFbIdHandle { } private: - explicit DrmFbIdHandle(std::shared_ptr drm) - : drm_(std::move(drm)){}; + explicit DrmFbIdHandle(DrmDevice &drm) : drm_(&drm){}; - const std::shared_ptr drm_; + DrmDevice *const drm_; uint32_t fb_id_{}; std::array gem_handles_{}; @@ -62,8 +60,7 @@ class DrmFbIdHandle { class DrmFbImporter { public: - explicit DrmFbImporter(std::shared_ptr drm) - : drm_(std::move(drm)){}; + explicit DrmFbImporter(DrmDevice &drm) : drm_(&drm){}; ~DrmFbImporter() = default; DrmFbImporter(const DrmFbImporter &) = delete; DrmFbImporter(DrmFbImporter &&) = delete; @@ -84,7 +81,7 @@ class DrmFbImporter { } } - const std::shared_ptr drm_; + DrmDevice *const drm_; std::map> drm_fb_id_handle_cache_; };