Skip to content
Snippets Groups Projects
Commit 21deb286 authored by Nobuhiko Tanibata's avatar Nobuhiko Tanibata Committed by Pekka Paalanen
Browse files

ivi-shell: transform refactoring to improve it to more readable code


Transform matrix for transforming a surface to global_matrix is
calculated from
* ivi_layout_surface_properties
* ivi_layout_layer_properties

This patch pareares sub-method like following,
1/ calc_surface_to_global_matrix()
 calc_transformation_matrix() is called twice with
 ivi_layout_surface/layer_properties respectively.

2/ calc_transformation_matrix()
 This calcurates matrix from orientation, source rectangle and
 destination rectangle.
 2-1/ To calculate rotation, fit centor of source rectangle to (0,0)
      temporarily. This is moved back in 2-4.
 2-2/ Apply rotation variant
 2-3/ Apply scale variant
 2-4/ Apply positioning variant, taking account into 2-1 temporary
      positioning.

Signed-off-by: default avatarNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent 1e6fd66b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment