Bug 353754 - [LoD] Occasional OpenGL artifact when using brush tool
Summary: [LoD] Occasional OpenGL artifact when using brush tool
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: OpenGL Canvas (show other bugs)
Version: 2.9.8
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 362303 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-10 10:29 UTC by Tyson Tan
Modified: 2016-05-11 14:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita 2.9.7 OpenGL-related white artifact around brush strokes (218.51 KB, image/png)
2015-10-10 10:32 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2015-10-10 10:29:54 UTC
When using brush tool, I sometimes encounter artifacts around the strokes. This is probably OpenGL related, because when I flip OpenGL OFF/ON the problem disappears. I could not find out what exactly caused it, but mostly after the follow situations (each standalone) :

1. Brush strokes after Undo/Redo;
2. Toggle Eraser mode ON/FF;
3. Change brush presets;
4. Rotating canvas;

This bug began to happen around Krita entered 2.9.6 ~ 2.9.7. It occurred multiple times a day when I was using Ubuntu 14.04 and building Krita from source. After upgrading to 15.04, I use Dmitry's PPA instead. It never happened to Krita-testing so far, but happened to krita-lod-unstable very frequently.

I will attach a screenshot below.

Reproducible: Always
Comment 1 Tyson Tan 2015-10-10 10:32:25 UTC
Created attachment 94926 [details]
Krita 2.9.7 OpenGL-related white artifact around brush strokes
Comment 2 Tyson Tan 2015-10-10 10:37:32 UTC
Also, those artifacts are not just there to show. They are actually on the layer and will be saved to documents. I guess the processing of transparency was somehow messed up?
Comment 3 Halla Rempt 2015-10-10 11:04:53 UTC
Hi Tyson,

I haven't seen that bug yet, but I doubt it's directly opengl related if it gets saved to the file. What's more likely is that the image projection recalculation broke a bit; Dmitry worked on that. And when flipping the canvas, the whole image gets recalculated unconditionally, fixing the issue.
Comment 4 Halla Rempt 2015-10-20 05:59:21 UTC
Hm, do you have a .kra file with an artefact for me? I wonder if it's only on the mergedimage.png or really in the layers themselves...
Comment 5 Dmitry Kazakov 2015-11-13 11:45:29 UTC
Hi, Tyson! Do I understand it right that the problem happens in krita-lod-unstable only?
Comment 6 Tyson Tan 2015-11-13 14:45:54 UTC
Sorry for not coming back on this one in time because I was very busy.

This is not krita-lod-unstable specific problem. I first ran into this issue when I was using Trisquel 7.0 (Ubuntu14.04) and built Krita from master branch. It happened very frequently between 2.9.6 and 2.9.7. I switched to Ubuntu Gnome 15.04 as a desperate attempt. I said krita-testing was not affected on 15.04, but I was wrong. I encountered the same kind of glitches soon after. krita-testing would glitch out once or twice a week, while krita-lod-unstable would glitch out many times in a few minutes.

But the glitch somehow happened less frequently now. The only related thing I notice was a few Linux kernel updates. Yesterday I had a glitch but it was the only one in 2 weeks, I think. I was using krita-lod-unstable.

If you cannot reproduce the glitch, we can change this into NEEDSINFO for now.

But still, it could be a brush specific bug. I haven't been using Fill_circle preset lately. But during the worst days, I was using Fill_circle exclusively as the material required it.
Comment 7 Tyson Tan 2015-11-25 16:24:27 UTC
Today after a few tests, I think the problem lies in Krita's brush engine or preset.

Now I have been using David Revoy's V7 brush preset bundle for a while, and mostly its "deevad E001 digital sketch" preset. The artifact had never happened since the day I imported David's bundle. 

However today I used Krita's default "Fill_circle" preset, and the artifact happened many times, every time when I was using it. It even happened a few times almost immediately after I start up Krita. So I highly suspect it's related to something about that "Fill_circle" preset.
Comment 8 Halla Rempt 2016-04-27 12:27:02 UTC
*** Bug 362303 has been marked as a duplicate of this bug. ***
Comment 9 Dmitry Kazakov 2016-05-11 14:08:16 UTC
Git commit 544d3a4ea506e93c89e6ae54e05939e9f933378e by Dmitry Kazakov.
Committed on 11/05/2016 at 14:04.
Pushed by dkazakov into branch 'master'.

Fix openGLrelated artifacts when canceling the LoD0 stroke

See a comment in KisTextureTile::update()
Fixes T2362

M  +4    -1    libs/ui/canvas/kis_canvas_updates_compressor.cpp
M  +16   -1    libs/ui/canvas/kis_update_info.cpp
M  +6    -0    libs/ui/canvas/kis_update_info.h
M  +1    -0    libs/ui/opengl/kis_opengl_image_textures.cpp
M  +31   -0    libs/ui/opengl/kis_texture_tile.cpp

http://commits.kde.org/krita/544d3a4ea506e93c89e6ae54e05939e9f933378e
Comment 10 Dmitry Kazakov 2016-05-11 14:08:16 UTC
Git commit e00aa7d5e96ba47486b640380e030f68ada880e7 by Dmitry Kazakov.
Committed on 11/05/2016 at 14:04.
Pushed by dkazakov into branch 'master'.

Avoid glitches when canceling the LoD0 stroke
Ref T2362

M  +17   -2    libs/image/kis_suspend_projection_updates_stroke_strategy.cpp
M  +2    -0    libs/image/kis_suspend_projection_updates_stroke_strategy.h

http://commits.kde.org/krita/e00aa7d5e96ba47486b640380e030f68ada880e7