
The existing algorithm had some corner cases (pun!), where it failed to produce correct vertices in the right order. This appeared only when the surface was transformed (rotated). It also produced degenerate polygons (3 or more vertices with zero polygon area) for non-transformed cases where the clipping and surface rectangles were adjacent but not overlapping. Introduce a new algorithm for finding the boundary vertices of the intersection of a coordinate axis aligned rectangle and an arbitrary polygon (here a quadrilateral). The code is based on the Sutherland-Hodgman algorithm, where a polygon is clipped by infinite lines one at a time. This new algorithm should always produce the correct vertices in the clockwise winding order, and discard duplicate vertices and degenerate polygons. It retains the fast paths of the existing algorithm for the no-hit and non-transformed cases. Benchmarking with earlier versions showed that the new algorithm is a little slower (56 vs. 68 us/call) than the existing algorithm, for the transformed case. The 'cliptest f' command before and after this commit can be used to compare the speed of the transformed case only. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com> Acked-by: Rob Clark <rob.clark@linaro.org>
Weston Weston is the reference implementation of a Wayland compositor, and a useful compositor in its own right. Weston has various backends that lets it run on Linux kernel modesetting and evdev input as well as under X11. Weston ships with a few example clients, from simple clients that demonstrate certain aspects of the protocol to more complete clients and a simplistic toolkit. There is also a quite capable terminal emulator (weston-terminal) and an toy/example desktop shell. Finally, weston also provides integration with the Xorg server and can pull X clients into the Wayland desktop and act as a X window manager. Refer to http://wayland.freedesktop.org/building.html for buiding weston and its dependencies.
Description
Languages
C
98.1%
Meson
1.3%
GLSL
0.3%
Shell
0.2%