Diffusion Krita dbe3171640e4

Restructure color selector shapes (again)

Authored by mwein on Jan 8 2020, 3:12 AM.

Description

Restructure color selector shapes (again)

Render a separate alpha mask:
This allows a generic optimization to skip all invisible pixels when
updating background. For triangle this alpha mask allows to skip ~50%
pixels that were never displayed.
Performance for ring shape stayed identical, was hoping for a small
boost at least...

Rework triangle code:
Removed some unused variables and use widget space a little better.
While at it, correct math that assumes certain widget geometry constraints.

TODO: code to fit triangle inside ring needs a tweak.
TODO: implement alpha mask for rectangle shape.

Details

Committed
mweinMar 28 2020, 12:58 AM
Parents
R37:6cb9e0bb521d: Make color selector aware of UI scaling
Branches
Unknown
Tags
Unknown
References
refs/keep-around/dbe3171640e43cda367909cdbb0e4ff61d936133