Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IsTileable property to effects #556

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Added IsTileable property to effects #556

merged 2 commits into from
Oct 11, 2023

Conversation

Lehonti
Copy link
Contributor

@Lehonti Lehonti commented Oct 10, 2023

In preparation for implementing #457

Nothing is being done with the property yet, but that's one of the next steps

/// If the ROIs are subdivided (in rows, for example) and the effect is applied to each subdivision
/// separately, is the end result the same as applying it to the original ROIs?
/// </summary>
public abstract bool IsTileable { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about defaulting this to true to reduce boilerplate, since this is the case for all existing effects?

Copy link
Contributor Author

@Lehonti Lehonti Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cameronwhite I made the property abstract on purpose because I figured tileability should be a conscious choice. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion, so I'm fine to keep it as-is since you've already made the changes anyway

@@ -37,6 37,12 @@ namespace Pinta.Core;
[Mono.Addins.TypeExtensionPoint]
public abstract class BaseEffect
{
/// <summary>
/// If the ROIs are subdivided (in rows, for example) and the effect is applied to each subdivision
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would word this as something like:

Specifies whether Render() can be called separately (and possibly in parallel) for different sub-regions of the image.
If false, Render() will be called once with the entire region the effect is applied to.
This is required for effects which cannot be applied independently to each pixel, e.g. if the effect accumulates information from previously processed pixels.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cameronwhite I've now used your wording.

@cameronwhite cameronwhite merged commit 9c24acf into PintaProject:master Oct 11, 2023
5 checks passed
@Lehonti Lehonti deleted the improvement1 branch October 11, 2023 22:49
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