If our surface has width and height set to the same dimensions as the output
then we can bypassing the scale factor calculation and addition of the
transformation.
The use case that led to this optimisation is the playback of video using
gstreamer-vaapi with the "scale" method. The video is the same dimensions as
the output (1080p.)
center_on_output(surface, shsurf->fullscreen_output);
break;
case WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE:
+ /* 1:1 mapping between surface and output dimensions */
+ if (output->width == surface->geometry.width &&
+ output->height == surface->geometry.height) {
+ weston_surface_set_position(surface, output->x, output->y);
+ break;
+ }
+
matrix = &shsurf->fullscreen.transform.matrix;
weston_matrix_init(matrix);