}
int DrmDisplayComposition::AddPlaneDisable(DrmPlane *plane) {
- composition_planes_.emplace_back(DrmCompositionPlane::Type::kDisable, plane,
- crtc_);
+ composition_planes_.emplace_back(DrmCompositionPlane::Type::kDisable, plane);
return 0;
}
DrmCompositionPlane() = default;
DrmCompositionPlane(DrmCompositionPlane &&rhs) = default;
DrmCompositionPlane &operator=(DrmCompositionPlane &&other) = default;
- DrmCompositionPlane(Type type, DrmPlane *plane, DrmCrtc *crtc)
- : type_(type), plane_(plane), crtc_(crtc) {
+ DrmCompositionPlane(Type type, DrmPlane *plane) : type_(type), plane_(plane) {
}
- DrmCompositionPlane(Type type, DrmPlane *plane, DrmCrtc *crtc,
- size_t source_layer)
- : type_(type),
- plane_(plane),
- crtc_(crtc),
- source_layers_(1, source_layer) {
+ DrmCompositionPlane(Type type, DrmPlane *plane, size_t source_layer)
+ : type_(type), plane_(plane), source_layers_(1, source_layer) {
}
Type type() const {
plane_ = plane;
}
- DrmCrtc *crtc() const {
- return crtc_;
- }
-
std::vector<size_t> &source_layers() {
return source_layers_;
}
private:
Type type_ = Type::kDisable;
DrmPlane *plane_ = NULL;
- DrmCrtc *crtc_ = NULL;
std::vector<size_t> source_layers_;
};
for (DrmCompositionPlane &comp_plane : comp_planes) {
DrmPlane *plane = comp_plane.plane();
- DrmCrtc *crtc = comp_plane.crtc();
std::vector<size_t> &source_layers = comp_plane.source_layers();
int fb_id = -1;
// Go through the provisioning stages and provision planes
for (auto &i : stages_) {
- int ret = i->ProvisionPlanes(&composition, layers, crtc, &planes);
+ int ret = i->ProvisionPlanes(&composition, layers, &planes);
if (ret) {
ALOGE("Failed provision stage with ret %d", ret);
return std::make_tuple(ret, std::vector<DrmCompositionPlane>());
int PlanStageProtected::ProvisionPlanes(
std::vector<DrmCompositionPlane> *composition,
- std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc *crtc,
+ std::map<size_t, DrmHwcLayer *> &layers,
std::vector<DrmPlane *> *planes) {
int ret = 0;
for (auto i = layers.begin(); i != layers.end();) {
continue;
}
- ret = Emplace(composition, planes, DrmCompositionPlane::Type::kLayer, crtc,
+ ret = Emplace(composition, planes, DrmCompositionPlane::Type::kLayer,
std::make_pair(i->first, i->second));
if (ret) {
ALOGE("Failed to dedicate protected layer! Dropping it.");
int PlanStageGreedy::ProvisionPlanes(
std::vector<DrmCompositionPlane> *composition,
- std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc *crtc,
+ std::map<size_t, DrmHwcLayer *> &layers,
std::vector<DrmPlane *> *planes) {
// Fill up the remaining planes
for (auto i = layers.begin(); i != layers.end(); i = layers.erase(i)) {
int ret = Emplace(composition, planes, DrmCompositionPlane::Type::kLayer,
- crtc, std::make_pair(i->first, i->second));
+ std::make_pair(i->first, i->second));
// We don't have any planes left
if (ret == -ENOENT)
break;
virtual int ProvisionPlanes(std::vector<DrmCompositionPlane> *composition,
std::map<size_t, DrmHwcLayer *> &layers,
- DrmCrtc *crtc,
std::vector<DrmPlane *> *planes) = 0;
protected:
// Inserts the given layer:plane in the composition at the back
static int Emplace(std::vector<DrmCompositionPlane> *composition,
std::vector<DrmPlane *> *planes,
- DrmCompositionPlane::Type type, DrmCrtc *crtc,
+ DrmCompositionPlane::Type type,
std::pair<size_t, DrmHwcLayer *> layer) {
DrmPlane *plane = PopPlane(planes);
std::vector<DrmPlane *> unused_planes;
}
if (!ret) {
- composition->emplace_back(type, plane, crtc, layer.first);
+ composition->emplace_back(type, plane, layer.first);
planes->insert(planes->begin(), unused_planes.begin(),
unused_planes.end());
}
class PlanStageProtected : public Planner::PlanStage {
public:
int ProvisionPlanes(std::vector<DrmCompositionPlane> *composition,
- std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc *crtc,
+ std::map<size_t, DrmHwcLayer *> &layers,
std::vector<DrmPlane *> *planes);
};
class PlanStageGreedy : public Planner::PlanStage {
public:
int ProvisionPlanes(std::vector<DrmCompositionPlane> *composition,
- std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc *crtc,
+ std::map<size_t, DrmHwcLayer *> &layers,
std::vector<DrmPlane *> *planes);
};
} // namespace android