After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764619 - Color paint dynamic parameter and square artifacts when one or two channel are disabled
Color paint dynamic parameter and square artifacts when one or two channel ar...
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2016-04-05 01:34 UTC by jose americo gobbo
Modified: 2017-02-21 22:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests with channels and Color parameter (313.10 KB, image/png)
2016-04-05 01:34 UTC, jose americo gobbo
  Details
quick hack (926 bytes, patch)
2016-04-05 10:27 UTC, Massimo
committed Details | Review

Description jose americo gobbo 2016-04-05 01:34:31 UTC
Created attachment 325395 [details]
tests with channels and Color parameter

When I used the parameter Color on Paint Dynamics and I use only 2 or 1 channel to paint... appears also square artefacts in the borderline.
I will try remove the alpha channel... but the behaviour is the same.
Comment 1 Massimo 2016-04-05 10:27:37 UTC
Created attachment 325410 [details] [review]
quick hack

A workaround here is to tick 'Use GimpApplicator'
in tool options.

Given that this code path seems to work (at least it doesn't have
square artifacts) comparing the 2 code paths I've tried the attached
quick hack which seems to fix the issue.

The idea is to 'translate' the line

https://git.gnome.org/browse/gimp/tree/app/paint/gimppaintcore.c#n891

to

https://git.gnome.org/browse/gimp/tree/app/paint/gimppaintcore.c#n963

and so add a
            
            src_buffer = gimp_drawable_get_buffer (drawable);

executed only in the case that otherwise has
src_buffer == dest_buffer == core->comp_buffer,
that would make the later call

          mask_components_onto (src_buffer,
                                core->comp_buffer,...

equivalent to an expensive copy from core->comp_buffer.

Either this is the problem or it is a problem
Comment 2 jose americo gobbo 2016-09-08 16:34:51 UTC
Perhaps, this bug report has relation with this bug too:
https://bugzilla.gnome.org/show_bug.cgi?id=771020
Comment 3 Michael Natterer 2016-10-08 19:26:21 UTC
I totally missed this bug. That "quick hack", is that just your
usual bug title or actually a bad hack? :)

I'm too tired now to follow that code and your patch seems
pretty trivial, so just push if you think it's the right thing
to do...
Comment 4 Michael Schumacher 2017-02-15 13:28:02 UTC
Was this pushed yet?
Comment 5 jose americo gobbo 2017-02-16 00:59:45 UTC
I have tested now with the last git master commit ebd939c and the artifact effect has relationship when 'Force' > 0 on the Tool Options.
See 771020 bug.
Comment 6 Michael Schumacher 2017-02-19 17:24:22 UTC
Comment on attachment 325410 [details] [review]
quick hack

comment 3
Comment 7 Michael Schumacher 2017-02-21 22:54:41 UTC
Pushed to master:

commit 3d58a233427848f856fa054414b3c237c12fc056
Author: Massimo Valentini <mvalentini@src.gnome.org>
Date:   Tue Apr 5 12:14:06 2016 +0200

    Bug 764619: Color paint dynamic parameter and square artifacts when one or two channel are disabled