diff options
-rw-r--r-- | src/wayland.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/wayland.cpp b/src/wayland.cpp index 66efb72..d7a0e22 100644 --- a/src/wayland.cpp +++ b/src/wayland.cpp @@ -486,22 +486,19 @@ surface::~surface() { void controller::surface_visibility(uint32_t id, int32_t visibility) { logdebug("genivi::surface %s @ %p v %i", __func__, this->proxy, visibility); - struct surface *s = this->surfaces[id].get(); - s->visibility = visibility; + this->surfaces[id]->visibility = visibility; } void controller::surface_opacity(uint32_t id, float opacity) { logdebug("genivi::surface %s @ %p o %f", __func__, this->proxy, opacity); - struct surface *s = this->surfaces[id].get(); - s->opacity = opacity; + this->surfaces[id]->opacity = opacity; } void controller::surface_source_rectangle(uint32_t id, int32_t x, int32_t y, int32_t width, int32_t height) { logdebug("genivi::surface %s @ %p x %i y %i w %i h %i", __func__, this->proxy, x, y, width, height); - struct surface *s = this->surfaces[id].get(); - s->src_rect = rect{uint32_t(width), uint32_t(height), x, y}; + this->surfaces[id]->src_rect = rect{uint32_t(width), uint32_t(height), x, y}; } void controller::surface_destination_rectangle(uint32_t id, int32_t x, @@ -509,20 +506,20 @@ void controller::surface_destination_rectangle(uint32_t id, int32_t x, int32_t height) { logdebug("genivi::surface %s @ %p x %i y %i w %i h %i", __func__, this->proxy, x, y, width, height); - struct surface *s = this->surfaces[id].get(); - s->dst_rect = rect{uint32_t(width), uint32_t(height), x, y}; + this->surfaces[id]->dst_rect = rect{uint32_t(width), uint32_t(height), x, y}; } void controller::surface_configuration(uint32_t id, int32_t width, int32_t height) { logdebug("genivi::surface %s @ %p w %i h %i", __func__, this->proxy, width, height); - struct surface *s = this->surfaces[id].get(); + auto &s = this->surfaces[id]; bool center = int(s->size.w) != int(width) && int(s->size.h) != int(height); s->size = size{uint32_t(width), uint32_t(height)}; if (center) add_task("fullscreen surface", [id](struct controller *c) { - c->surfaces[id]->set_destination_rectangle(0, 0, c->output_size.w, c->output_size.h); + c->surfaces[id]->set_destination_rectangle(0, 0, c->output_size.w, + c->output_size.h); c->surfaces[id]->set_visibility(1); c->layers[100]->add_surface(c->surfaces[id].get()); c->layers[100]->set_visibility(1); @@ -531,8 +528,7 @@ void controller::surface_configuration(uint32_t id, int32_t width, void controller::surface_orientation(uint32_t id, int32_t orientation) { logdebug("genivi::surface %s @ %p o %i", __func__, this->proxy, orientation); - struct surface *s = this->surfaces[id].get(); - s->orientation = orientation; + this->surfaces[id]->orientation = orientation; } void controller::surface_pixelformat(uint32_t id, int32_t pixelformat) { |