[PATCH weston 0/8] Fix pixman-renderer cropping
Pekka Paalanen
ppaalanen at gmail.com
Fri Mar 6 03:03:55 PST 2015
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Hi,
this is a series of relatively small changes to the Pixman-renderer, with the
major goals of a) clean up the draw_view/repaint_region machinery, and b)
properly implement source clipping. This is a follow-up to
http://lists.freedesktop.org/archives/wayland-devel/2015-March/020354.html
Before this series, you can see misrending in a particular case: launch Weston
with any visible backend using the Pixman-renderer, start weston-scaler and
rotate its window. Weston-scaler uses wl_viewport to crop the buffer so that no
red should appear. When rotated, Pixman-renderer fails to crop properly, and
the red area becomes visible.
This series fixes that case, and as a last step also implements the view
scissor for weston_view_set_mask() to be used by ivi-shell.
The patch series can be found at:
http://cgit.collabora.com/git/user/pq/weston.git/log/?h=pixmancomplex-2
I have tested that branch to show correct rendering all the cases:
- weston-terminal (has blended and opaque regions)
- weston-scaler (uses wl_viewport cropping)
while their windows are:
- in a normal state
- translucent (Mod+Alt+MouseWheel)
- rotated (Mod+RightButtonDrag)
- rotated and translucent
So all the combinations of those appear drawn right.
Additionally, I have tested that hacking ivi-shell to clip a window works
right. This test was done with the branch:
http://cgit.collabora.com/git/user/pq/weston.git/log/?h=viewclip-5
which contains the non-upstreamable hacks. I ran Weston with Pixman-renderer
and ivi-shell, and then started a clipped app with:
$ IVI_ID=555 ./weston-clickdot
This triggers the hacked hardcoded view clip.
Thanks,
pq
Pekka Paalanen (8):
compositor: add weston_surface_to_buffer_region()
pixman-renderer: put transformation computation into function
pixman-renderer: refactor into region_intersect_only_translation()
pixman-renderer: add view_transformation_is_translation()
pixman-renderer: change repaint_region() arguments
pixman-renderer: move code to draw_view_translated()
pixman-renderer: implement source clipping
pixman-renderer: implement view scissor
src/compositor.c | 36 ++++++
src/compositor.h | 5 +
src/pixman-renderer.c | 342 +++++++++++++++++++++++++++++++++++++++-----------
3 files changed, 308 insertions(+), 75 deletions(-)
--
2.0.5
More information about the wayland-devel
mailing list