drm_hwcomposer: fix small class consistency issues
This also fixes a typo in an error message.
Change-Id: Ie6c369f5eb2496ac3ebb342dbdcdd70f3a176495
diff --git a/drm_hwcomposer.h b/drm_hwcomposer.h
index fdf389b..1490438 100644
--- a/drm_hwcomposer.h
+++ b/drm_hwcomposer.h
@@ -175,7 +175,7 @@
return importer_ != NULL;
}
- hwc_drm_bo *operator->();
+ const hwc_drm_bo *operator->() const;
void Clear();
@@ -257,11 +257,12 @@
UniqueFd acquire_fence;
OutputFd release_fence;
- DrmHwcLayer() = default;
- DrmHwcLayer(DrmHwcLayer &&rhs) = default;
-
int InitFromHwcLayer(hwc_layer_1_t *sf_layer, Importer *importer,
const gralloc_module_t *gralloc);
+
+ buffer_handle_t get_usable_handle() const {
+ return handle.get() != NULL ? handle.get() : sf_handle;
+ }
};
struct DrmHwcDisplayContents {