[PATCH weston] shell: Bypass fullscreen scaling if surface width and height match output
Konno, Joe
joe.konno at linux.intel.com
Tue Feb 12 07:53:37 PST 2013
Tested-by: Joe Konno <joe.konno at intel.com>
On 02/12/2013 03:53 AM, Rob Bradford wrote:
> From: Rob Bradford <rob at linux.intel.com>
>
> 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.)
> ---
> src/shell.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/shell.c b/src/shell.c
> index 368fa5b..19ccdfd 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -1672,6 +1672,13 @@ shell_configure_fullscreen(struct shell_surface *shsurf)
> 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);
>
--
Joe Konno
Software Engineer, Visualization QA and Validation
Intel Corporation
Open Source Technology Center
Hillsboro, Oregon, USA
Ph: +1 503 264 0365
More information about the wayland-devel
mailing list