1
0
Fork 0

drm_hwcomposer: Make HwcLayer const in Backend

Backend shouldn't directly mutate HwcLayer state, so make HwcLayer
const. Make a few other related functions const correct as well.

Change-Id: Id7f8e255e9e72b756399b1a4dabc3db779d64bc9
This commit is contained in:
Drew Davenport 2025-08-01 05:57:31 +00:00
parent 728701adba
commit 4a84e27035
8 changed files with 45 additions and 36 deletions

View file

@ -196,7 +196,7 @@ static uint64_t ToDrmRotation(LayerTransform transform) {
return rotation;
}
bool DrmPlane::IsValidForLayer(LayerData *layer) {
bool DrmPlane::IsValidForLayer(const LayerData *layer) {
if (layer == nullptr || !layer->bi) {
ALOGE("%s: Invalid parameters", __func__);
return false;

View file

@ -45,7 +45,7 @@ class DrmPlane : public PipelineBindable<DrmPlane> {
-> std::unique_ptr<DrmPlane>;
bool IsCrtcSupported(const DrmCrtc &crtc) const;
bool IsValidForLayer(LayerData *layer);
bool IsValidForLayer(const LayerData *layer);
auto GetType() const {
return type_;