logdebug(
"wl::output %s @ %p x %i y %i w %i h %i spel %x make %s model %s tx %i",
__func__, this->proxy.get(), x, y, pw, ph, subpel, make, model, tx);
+ this->transform = tx;
}
void output::mode(uint32_t flags, int32_t w, int32_t h, int32_t r) {
void output::done() {
logdebug("wl::output %s @ %p done", __func__, this->proxy.get());
+ // Let's just disregard the flipped ones...
+ if (this->transform == WL_OUTPUT_TRANSFORM_90 ||
+ this->transform == WL_OUTPUT_TRANSFORM_270) {
+ std::swap(this->width, this->height);
+ }
}
void output::scale(int32_t factor) {
void controller::controller_layer(uint32_t id) {
logdebug("genivi::controller @ %p layer %u (%x)", this->proxy.get(), id, id);
- auto &l = this->layers[id] = std::make_unique<struct layer>(id, this);
- l->clear_surfaces();
+ if (this->layers.find(id) != this->layers.end()) {
+ logerror("Someone created a layer without asking US! (%d)", id);
+ } else {
+ auto &l = this->layers[id] = std::make_unique<struct layer>(id, this);
+ l->clear_surfaces();
+ }
}
void controller::controller_surface(uint32_t id) {
logdebug("genivi::controller @ %p surface %u (%x)", this->proxy.get(), id,
id);
- this->surfaces[id] = std::make_unique<struct surface>(id, this);
- this->chooks->surface_created(id);
+ if (this->surfaces.find(id) == this->surfaces.end()) {
+ this->surfaces[id] = std::make_unique<struct surface>(id, this);
+ this->chooks->surface_created(id);
+ }
}
void controller::controller_error(int32_t object_id, int32_t object_type,