[RFC weston 00/16] Replace existing transformation code with matrix operations

Derek Foreman derekf at osg.samsung.com
Fri Sep 26 14:10:11 PDT 2014


This is also available at https://github.com/ManMower/weston/commits/transforms

The goal of this patch set is to remove much of the bulky switch statement
based transform code and replace it with matrix multiplication.  Hopefully
this will result in a more maintainable pixman renderer due to the removal
of all the special cases for each screen transform.

Functions to decompose an affine transformation matrix into basic operations
are added - these are useful for determining if bilinear filtering should
be enabled, or if video planes can be used.

Oh, and the pixman renderer now supports zooming.


Derek Foreman (10):
  compositor: Move weston_matrix_transform_region to compositor.c and
    export it
  compositor: add weston_matrix_transform_rect() and use it for where
    appropriate
  compositor: use matrix transforms for surface_to_buffer functions
  compositor: use weston_matrix_transform_region for overlay setup
  compositor: Remove weston_transformed_region
  matrix: Add functions to decompose a transformation matrix into basic
    operations
  compositor: Add a function to test if images transformed by a matrix
    should be bilinearly filtered
  renderers: use weston_matrix_needs_filtering to choose filter
    parameters in gl and pixman renderers
  compositor-drm: use weston_surface_to_buffer_rect instead of
    weston_transformed_rect
  compositor: Remove weston_transformed_rect() and
    weston_transformed_coord()

Jason Ekstrand (6):
  weston_surface: Add surface-to-buffer and buffer-to-surface matrices
  gl-renderer: Call glViewport after the context is made current
  Use pixel coordinates for weston_output.matrix
  zoom: Use pixels instead of GL coordinates
  pixman-renderer: Add a weston_matrix_to_pixman_transform function and 
       simplify the buffer-to-output matrix computation
  pixman-renderer: Use output->matrix for region transformations and
    enable output zoom

 shared/matrix.c          | 359 +++++++++++++++++++++++++++++++++++++
 shared/matrix.h          |  31 ++++
 src/compositor-drm.c     |  50 ++----
 src/compositor-wayland.c |   8 +-
 src/compositor-x11.c     |   8 +-
 src/compositor.c         | 447 ++++++++++++++++++++---------------------------
 src/compositor.h         |  29 +--
 src/gl-renderer.c        |  35 ++--
 src/pixman-renderer.c    | 171 +++---------------
 src/screen-share.c       |   8 +-
 src/screenshooter.c      |   7 +-
 src/zoom.c               |  38 ++--
 12 files changed, 683 insertions(+), 508 deletions(-)

-- 
2.1.0



More information about the wayland-devel mailing list