Move implementations out of headers
This change moves some non-trivial implementations out of header files in drm/. This will enable some includes to be converted to forward declarations in future changes. Change-Id: I7b1248657e0fa27e3c0c0157abe4f6b918e13a29
This commit is contained in:
parent
5ee173b752
commit
1e0e2ca0a5
8 changed files with 61 additions and 41 deletions
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
namespace android::drm_hwcomposer {
|
||||
|
||||
DrmDevice::~DrmDevice() = default;
|
||||
|
||||
auto DrmDevice::CreateInstance(std::string const &path,
|
||||
ResourceManager *res_man, uint32_t index)
|
||||
-> std::unique_ptr<DrmDevice> {
|
||||
|
|
@ -194,6 +196,26 @@ auto DrmDevice::RegisterUserPropertyBlob(void *data, size_t length) const
|
|||
});
|
||||
}
|
||||
|
||||
DrmCrtc *DrmDevice::FindCrtcById(uint32_t id) const {
|
||||
for (const auto &crtc : crtcs_) {
|
||||
if (crtc->GetId() == id) {
|
||||
return crtc.get();
|
||||
}
|
||||
};
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DrmEncoder *DrmDevice::FindEncoderById(uint32_t id) const {
|
||||
for (const auto &enc : encoders_) {
|
||||
if (enc->GetId() == id) {
|
||||
return enc.get();
|
||||
}
|
||||
};
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int DrmDevice::GetProperty(uint32_t obj_id, uint32_t obj_type,
|
||||
const char *prop_name, DrmProperty *property) const {
|
||||
drmModeObjectPropertiesPtr props = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue