summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2015-03-06 10:33:50 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2015-03-11 13:38:28 +0200
commitc93782ad3346b21ad6dd323c44b48dab8b22f36d (patch)
treed00715a426428ebecc272caaca6be987d76e648c
parentd7ca6b0bbefe36850bacf44c256a283112c06217 (diff)
pixman-renderer: implement view scissor
Only needed in the source-clipped case, otherwise the boundingbox is already doing the necessary clipping. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-By: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r--src/pixman-renderer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pixman-renderer.c b/src/pixman-renderer.c
index be3b3e58..a4796845 100644
--- a/src/pixman-renderer.c
+++ b/src/pixman-renderer.c
@@ -443,6 +443,10 @@ draw_view_source_clipped(struct weston_view *view,
pixman_region32_init_rect(&surf_region, 0, 0,
surface->width, surface->height);
+ if (view->geometry.scissor_enabled)
+ pixman_region32_intersect(&surf_region, &surf_region,
+ &view->geometry.scissor);
+
pixman_region32_init(&buffer_region);
weston_surface_to_buffer_region(surface, &surf_region, &buffer_region);
@@ -489,6 +493,8 @@ draw_view(struct weston_view *ev, struct weston_output *output,
* etc. are convertible to global coordinate space.
* There is no need to use a source clip region.
* It is possible to paint opaque region as PIXMAN_OP_SRC.
+ * Also the boundingbox is accurate rather than an
+ * approximation.
*/
draw_view_translated(ev, output, &repaint);
} else {
@@ -838,6 +844,7 @@ pixman_renderer_init(struct weston_compositor *ec)
ec->renderer = &renderer->base;
ec->capabilities |= WESTON_CAP_ROTATION_ANY;
ec->capabilities |= WESTON_CAP_CAPTURE_YFLIP;
+ ec->capabilities |= WESTON_CAP_VIEW_CLIP_MASK;
renderer->debug_binding =
weston_compositor_add_debug_binding(ec, KEY_R,