Diffusion Krita 577c4546b448

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 24 2020, 9:29 PM
Parents
R37:5b920351a9d9: Make color selector aware of UI scaling
Branches
Unknown
Tags
Unknown