Skip to content

Removed unused members in classes inheriting from UserBlendOp#1700

Merged
cameronwhite merged 5 commits into
PintaProject:masterfrom
Lehonti:improvement/removing_unused_blendop_methods
Aug 30, 2025
Merged

Removed unused members in classes inheriting from UserBlendOp#1700
cameronwhite merged 5 commits into
PintaProject:masterfrom
Lehonti:improvement/removing_unused_blendop_methods

Conversation

@Lehonti

@Lehonti Lehonti commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

As mentioned in #1553

The only exception is the "Normal" blend op, which was re-written (and cleaned up) separately as part of #1696

The parts removed were:

  • The methods named "CreateWithOpacity " and related classes. In #1696 I floated the following idea:

    ...if we want the blend ops to offer that in the future [...] I think it doesn't need to be implemented separately for every blend op, but it can be implemented once and then composed...

  • The Apply method overrides with Span and ReadOnlySpan parameters. As explained in #1696:

    They are almost exactly the same code as the original virtual methods, the only difference being that the overrides call ApplyStatic. I think the JIT compiler can optimize that out and de-virtualize and/or inline these calls.

@cameronwhite

Copy link
Copy Markdown
Member

Can CreateWithOpacity() also be removed from the base class now?

@Lehonti

Lehonti commented Aug 30, 2025

Copy link
Copy Markdown
Contributor Author

I hadn't seen that method but you are right @cameronwhite. I just removed it.

@cameronwhite cameronwhite merged commit 36124b1 into PintaProject:master Aug 30, 2025
6 checks passed
@Lehonti Lehonti deleted the improvement/removing_unused_blendop_methods branch August 30, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants