[PATCH weston 2/3] compositor-drm: Support scan out of transformed buffers
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Tue Nov 27 07:03:43 PST 2012
If a client renders its buffers with the same transform as the output,
we can scan out them when fullscreen.
---
src/compositor-drm.c | 14 ++++++++++----
src/compositor.c | 3 ---
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 417b67f..2066dd4 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -316,10 +316,11 @@ drm_output_prepare_scanout_surface(struct weston_output *_output,
if (es->geometry.x != output->base.x ||
es->geometry.y != output->base.y ||
- es->geometry.width != output->base.current->width ||
- es->geometry.height != output->base.current->height ||
- es->transform.enabled ||
- es->buffer == NULL)
+ es->buffer == NULL ||
+ es->buffer->width != output->base.current->width ||
+ es->buffer->height != output->base.current->height ||
+ output->base.transform != es->buffer_transform ||
+ es->transform.enabled)
return NULL;
bo = gbm_bo_import(c->gbm, GBM_BO_IMPORT_WL_BUFFER,
@@ -566,6 +567,9 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
uint32_t format;
wl_fixed_t sx1, sy1, sx2, sy2;
+ if (output_base->transform != WL_OUTPUT_TRANSFORM_NORMAL)
+ return NULL;
+
if (c->sprites_are_broken)
return NULL;
@@ -678,6 +682,8 @@ drm_output_prepare_cursor_surface(struct weston_output *output_base,
(struct drm_compositor *) output_base->compositor;
struct drm_output *output = (struct drm_output *) output_base;
+ if (output->base.transform != WL_OUTPUT_TRANSFORM_NORMAL)
+ return NULL;
if (output->cursor_surface)
return NULL;
if (es->output_mask != (1u << output_base->id))
diff --git a/src/compositor.c b/src/compositor.c
index 44cd4a8..265bd58 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2793,9 +2793,6 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c,
output->mm_height = height;
output->dirty = 1;
- if (transform != WL_OUTPUT_TRANSFORM_NORMAL)
- output->disable_planes++;
-
weston_output_transform_init(output, transform);
weston_output_init_zoom(output);
--
1.7.10.4
More information about the wayland-devel
mailing list