Devirtualize call on `KisCurveCircleMaskGenerator::valueAt`
Needs RevisionPublic

Authored by poke1024 on Sep 20 2017, 9:15 PM.

Details

Reviewers
dkazakov
Group Reviewers
Krita
Summary

Some preparations for making KisCurveCircleMaskGenerator vectorizable; the main part is obviously missing with this patch.

Yet the one point of this patch is that by adding final to KisCircleMaskGenerator::valueAt (and KisCurveCircleMaskGenerator::valueAt), the inner loops calls to valueAt in KisBrushMaskScalarApplicator<MaskGenerator, _impl>::processScalar (i.e. m_maskGenerator->valueAt) might now be devirtualized/compiled without a vcall (given a smart compiler), and might even be inlinable if valueAt is moved to the headers (given a smart compiler).

Calls to KisCircleMaskGenerator::valueAt amounted to 4% of the runtime while drawing with Layout_circle_soft in my profiling.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
poke1024 created this revision.Sep 20 2017, 9:15 PM

Codewise the patch looks correct. Though I would prefer to push it together with the vectorizing patch. You can either split 'final' patch into a separate patch, or just wait till the vectorizing part is done.

dkazakov requested changes to this revision.Oct 3 2017, 2:20 PM

I'll mark this patch as Needs Work, so it would not appear in "Must review" list until the vectorizing part is implemented :)

This revision now requires changes to proceed.Oct 3 2017, 2:20 PM