[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #23 from Andrew Crouthamel --- Created attachment 115207 --> https://bugs.kde.org/attachment.cgi?id=115207=edit Brush example -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #22 from Andrew Crouthamel --- I just tested with latest master again. I still get the blocky canvas update for the brush. I've attached a short video. It's choppy in the video, but that's just my laptop, reality isn't that slow :). You can at least see what I'm seeing though. -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Boudewijn Rempt changed: What|Removed |Added Latest Commit|https://commits.kde.org/kri |https://commits.kde.org/kri |ta/8739c93870f0ce63633402ce |ta/61bc0420ae078a0a7896722f |b175cad9362fd4cf|25f6b643f3762b6e --- Comment #21 from Boudewijn Rempt --- Git commit 61bc0420ae078a0a7896722f25f6b643f3762b6e by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 24/09/2018 at 07:05. Pushed by rempt into branch 'krita/4.1'. Fix delays in the end of Instant Preview rendering stroke Needs your testing! Test Plan: 1) Paint with complex brushes on Float32 images 2) Try painting many repetitive strokes, there should be no flockering and no delays. 3) Try cancel your srokes before they are finished with Esc key. Please note that the most dangerous moment is when Krita writes "Updating..." right before background stroke calculation is finished. Try pressing exactly at this moment! :) Technical Details: There was a short delay in the end of every Instant Preview regeneration stroke. It was mostly seen on bigger canvases and Float32-bitdepth mode. The cause of this delay was the "update resume" stroke that tried to upload the 100%-zoom image data to the canvas. Sometimes such uploading could take up to 1.5 seconds, which could interfere into the painter's workflow. This patch does multiple things to mitigate this problem: 1) KisSuspendProjectionUpdatesStrokeStrategy is now suspendable (again). It means that Krita will suspend the uploading process if the user desides to paint further instead of waiting for the background rendering to complete. This is the main part of this patch. 2) On resuming Krita will not upload the entire image to the canvas, but only a changed part. This is achieved by collecting dirty requests in KisImage::enableUIUpdates(). This method itself doesn't solve the initial problem, but it makes uploading a bit more efficient. 3) While the resume stroke is suspended, KisOpenGLCanvas2 blocks all the synchronizations of tiles' mipmaps. It means that normal lodN strokes will run with the mipmaps blocked. It is a bit dangerous approach, but it works until KisSuspendProjectionUpdatesStrokeStrategy is the only user of sigRequestLodPlanesSyncBlocked() signal. CC:kimages...@kde.org Fixes T2145 M +3-3libs/global/kis_pointer_utils.h M +1-0libs/image/CMakeLists.txt M +2-2libs/image/KisFakeRunnableStrokeJobsExecutor.cpp M +1-1libs/image/KisFakeRunnableStrokeJobsExecutor.h M +3-3libs/image/KisRunnableBasedStrokeStrategy.cpp M +1-1libs/image/KisRunnableBasedStrokeStrategy.h M +2-2libs/image/KisRunnableStrokeJobData.cpp M +3-3libs/image/KisRunnableStrokeJobData.h C +4-11 libs/image/KisRunnableStrokeJobDataBase.cpp [from: libs/image/KisRunnableStrokeJobsInterface.cpp - 070% similarity] C +10 -13 libs/image/KisRunnableStrokeJobDataBase.h [from: libs/image/KisRunnableStrokeJobsInterface.h - 058% similarity] M +8-8libs/image/KisRunnableStrokeJobUtils.h M +1-1libs/image/KisRunnableStrokeJobsInterface.cpp M +9-3libs/image/KisRunnableStrokeJobsInterface.h M +15 -1libs/image/kis_image.cc M +4-21 libs/image/kis_image.h M +1-1libs/image/kis_image_interfaces.h M +8-10 libs/image/kis_image_signal_router.cpp M +34 -2libs/image/kis_image_signal_router.h M +0-20 libs/image/kis_strokes_queue.cpp M +292 -86 libs/image/kis_suspend_projection_updates_stroke_strategy.cpp M +7-2libs/image/kis_suspend_projection_updates_stroke_strategy.h M +37 -17 libs/ui/canvas/kis_canvas2.cpp M +3-2libs/ui/canvas/kis_canvas2.h M +5-5libs/ui/canvas/kis_update_info.cpp M +6-4libs/ui/canvas/kis_update_info.h M +1-1libs/ui/kis_animation_frame_cache.cpp M +1-1libs/ui/opengl/kis_opengl_canvas2.cpp M +3-3libs/ui/opengl/kis_opengl_image_textures.cpp M +1-1libs/ui/opengl/kis_opengl_image_textures.h M +3-2libs/ui/opengl/kis_texture_tile.cpp M +1-1libs/ui/opengl/kis_texture_tile.h https://commits.kde.org/krita/61bc0420ae078a0a7896722f25f6b643f3762b6e -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Boudewijn Rempt changed: What|Removed |Added Latest Commit|https://commits.kde.org/kri |https://commits.kde.org/kri |ta/b5c33311b1f70f3bd249461a |ta/8739c93870f0ce63633402ce |31a7333f964e5fb4|b175cad9362fd4cf --- Comment #20 from Boudewijn Rempt --- Git commit 8739c93870f0ce63633402ceb175cad9362fd4cf by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 24/09/2018 at 06:57. Pushed by rempt into branch 'krita/4.1'. Fix flickering on Instant Preview finishing original regeneration The problem happened mipmap regeneration. Basically, we should not start regenerating tile mipmaps until all the updates have been completed. Otherwise, some parts of the regenerated mipmap will have outdated (old) content and the user will see flickering. Now KisImage has two special signals that notify the canvas thay a special "lod rest updates batch" is coming. The canvas will block tile regeneration for this batch and will start it right after the batch is completed. Therefore the user will see completely prepared data. Fixes T2145 CC:kimages...@kde.org M +20 -0libs/image/kis_image.h M +16 -0libs/image/kis_image_signal_router.cpp M +3-0libs/image/kis_image_signal_router.h M +19 -5libs/image/kis_suspend_projection_updates_stroke_strategy.cpp M +2-0libs/ui/canvas/kis_abstract_canvas_widget.h M +70 -16 libs/ui/canvas/kis_canvas2.cpp M +2-0libs/ui/canvas/kis_canvas2.h M +4-0libs/ui/canvas/kis_qpainter_canvas.h M +23 -0libs/ui/canvas/kis_update_info.cpp M +21 -0libs/ui/canvas/kis_update_info.h M +11 -4libs/ui/opengl/kis_opengl_canvas2.cpp M +1-0libs/ui/opengl/kis_opengl_canvas2.h M +15 -20 libs/ui/opengl/kis_texture_tile.cpp M +8-4libs/ui/opengl/kis_texture_tile.h https://commits.kde.org/krita/8739c93870f0ce63633402ceb175cad9362fd4cf -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #19 from Andrew Crouthamel --- I've built Krita from latest git master, I don't notice the issue as reported. I do notice some of this similar blocky canvas update, but localized to the brush position as I draw. But that may just be my poor graphics card not keeping up. -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #18 from Andrew Crouthamel --- Wow, lots of work there! I'll test it out in a few hours when I get home. -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Dmitry Kazakov changed: What|Removed |Added Latest Commit|https://commits.kde.org/kri |https://commits.kde.org/kri |ta/58b982cbb7bfa133bbb0bab5 |ta/b5c33311b1f70f3bd249461a |b163c24a9bb83d61|31a7333f964e5fb4 --- Comment #17 from Dmitry Kazakov --- Git commit b5c33311b1f70f3bd249461a31a7333f964e5fb4 by Dmitry Kazakov. Committed on 20/09/2018 at 17:08. Pushed by dkazakov into branch 'master'. Fix delays in the end of Instant Preview rendering stroke Needs your testing! Test Plan: 1) Paint with complex brushes on Float32 images 2) Try painting many repetitive strokes, there should be no flockering and no delays. 3) Try cancel your srokes before they are finished with Esc key. Please note that the most dangerous moment is when Krita writes "Updating..." right before background stroke calculation is finished. Try pressing exactly at this moment! :) Technical Details: There was a short delay in the end of every Instant Preview regeneration stroke. It was mostly seen on bigger canvases and Float32-bitdepth mode. The cause of this delay was the "update resume" stroke that tried to upload the 100%-zoom image data to the canvas. Sometimes such uploading could take up to 1.5 seconds, which could interfere into the painter's workflow. This patch does multiple things to mitigate this problem: 1) KisSuspendProjectionUpdatesStrokeStrategy is now suspendable (again). It means that Krita will suspend the uploading process if the user desides to paint further instead of waiting for the background rendering to complete. This is the main part of this patch. 2) On resuming Krita will not upload the entire image to the canvas, but only a changed part. This is achieved by collecting dirty requests in KisImage::enableUIUpdates(). This method itself doesn't solve the initial problem, but it makes uploading a bit more efficient. 3) While the resume stroke is suspended, KisOpenGLCanvas2 blocks all the synchronizations of tiles' mipmaps. It means that normal lodN strokes will run with the mipmaps blocked. It is a bit dangerous approach, but it works until KisSuspendProjectionUpdatesStrokeStrategy is the only user of sigRequestLodPlanesSyncBlocked() signal. CC:kimages...@kde.org Fixes T2145 M +3-3libs/global/kis_pointer_utils.h M +1-0libs/image/CMakeLists.txt M +2-2libs/image/KisFakeRunnableStrokeJobsExecutor.cpp M +1-1libs/image/KisFakeRunnableStrokeJobsExecutor.h M +3-3libs/image/KisRunnableBasedStrokeStrategy.cpp M +1-1libs/image/KisRunnableBasedStrokeStrategy.h M +2-2libs/image/KisRunnableStrokeJobData.cpp M +3-3libs/image/KisRunnableStrokeJobData.h C +4-11 libs/image/KisRunnableStrokeJobDataBase.cpp [from: libs/image/KisRunnableStrokeJobsInterface.cpp - 070% similarity] C +10 -13 libs/image/KisRunnableStrokeJobDataBase.h [from: libs/image/KisRunnableStrokeJobsInterface.h - 058% similarity] M +8-8libs/image/KisRunnableStrokeJobUtils.h M +1-1libs/image/KisRunnableStrokeJobsInterface.cpp M +9-3libs/image/KisRunnableStrokeJobsInterface.h M +15 -1libs/image/kis_image.cc M +4-21 libs/image/kis_image.h M +1-1libs/image/kis_image_interfaces.h M +8-10 libs/image/kis_image_signal_router.cpp M +34 -2libs/image/kis_image_signal_router.h M +0-20 libs/image/kis_strokes_queue.cpp M +292 -86 libs/image/kis_suspend_projection_updates_stroke_strategy.cpp M +7-2libs/image/kis_suspend_projection_updates_stroke_strategy.h M +37 -17 libs/ui/canvas/kis_canvas2.cpp M +3-2libs/ui/canvas/kis_canvas2.h M +5-5libs/ui/canvas/kis_update_info.cpp M +6-4libs/ui/canvas/kis_update_info.h M +1-1libs/ui/kis_animation_frame_cache.cpp M +1-1libs/ui/opengl/kis_opengl_canvas2.cpp M +3-3libs/ui/opengl/kis_opengl_image_textures.cpp M +1-1libs/ui/opengl/kis_opengl_image_textures.h M +3-2libs/ui/opengl/kis_texture_tile.cpp M +1-1libs/ui/opengl/kis_texture_tile.h https://commits.kde.org/krita/b5c33311b1f70f3bd249461a31a7333f964e5fb4 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Dmitry Kazakov changed: What|Removed |Added Resolution|--- |FIXED Latest Commit|http://commits.kde.org/krit |https://commits.kde.org/kri |a/f114bcc1a2251d55cb3339548 |ta/58b982cbb7bfa133bbb0bab5 |9cc8d52c8f84ee6 |b163c24a9bb83d61 Status|CONFIRMED |RESOLVED --- Comment #16 from Dmitry Kazakov --- Git commit 58b982cbb7bfa133bbb0bab5b163c24a9bb83d61 by Dmitry Kazakov. Committed on 19/09/2018 at 08:23. Pushed by dkazakov into branch 'master'. Fix flickering on Instant Preview finishing original regeneration The problem happened mipmap regeneration. Basically, we should not start regenerating tile mipmaps until all the updates have been completed. Otherwise, some parts of the regenerated mipmap will have outdated (old) content and the user will see flickering. Now KisImage has two special signals that notify the canvas thay a special "lod rest updates batch" is coming. The canvas will block tile regeneration for this batch and will start it right after the batch is completed. Therefore the user will see completely prepared data. Fixes T2145 CC:kimages...@kde.org M +20 -0libs/image/kis_image.h M +16 -0libs/image/kis_image_signal_router.cpp M +3-0libs/image/kis_image_signal_router.h M +19 -5libs/image/kis_suspend_projection_updates_stroke_strategy.cpp M +2-0libs/ui/canvas/kis_abstract_canvas_widget.h M +70 -16 libs/ui/canvas/kis_canvas2.cpp M +2-0libs/ui/canvas/kis_canvas2.h M +4-0libs/ui/canvas/kis_qpainter_canvas.h M +23 -0libs/ui/canvas/kis_update_info.cpp M +21 -0libs/ui/canvas/kis_update_info.h M +11 -4libs/ui/opengl/kis_opengl_canvas2.cpp M +1-0libs/ui/opengl/kis_opengl_canvas2.h M +15 -20 libs/ui/opengl/kis_texture_tile.cpp M +8-4libs/ui/opengl/kis_texture_tile.h https://commits.kde.org/krita/58b982cbb7bfa133bbb0bab5b163c24a9bb83d61 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Dmitry Kazakov changed: What|Removed |Added CC||dimul...@gmail.com --- Comment #15 from Dmitry Kazakov --- The bug actually present on all bit depths (I have tested it). But in 8-bit mode it is happens too quickly to be easily seen :) -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Andrew Crouthamel changed: What|Removed |Added Status|REOPENED|CONFIRMED --- Comment #14 from Andrew Crouthamel --- (In reply to Sketch Stick from comment #13) > I'm actually using an AMD RX 480 using the mesa/amdgpu driver. > > I usually reproduce with a document set to RGB/Alpha, 32-bit float/channel > and sRGB-elle-V2-g10.icc > > Using a large document and a smudge brush to make it as slow as possible, > with progress reporting enabled it should flicker just after it hits 100%. Aha! There we go. Thank you for the details, I can confirm this. Application Version: 4.2.0 (git master) KDE Plasma Version: 5.13.5 KDE Frameworks Version: 5.50.0 Qt Version: 5.11.1 Intel HD Graphics 620 Mesa 18.1.8 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #13 from Sketch Stick --- I'm actually using an AMD RX 480 using the mesa/amdgpu driver. I usually reproduce with a document set to RGB/Alpha, 32-bit float/channel and sRGB-elle-V2-g10.icc Using a large document and a smudge brush to make it as slow as possible, with progress reporting enabled it should flicker just after it hits 100%. -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #12 from Andrew Crouthamel --- Thanks for the retest, I can't reproduce on my system which is Intel/Mesa. Maybe it is an Nvidia issue? Anyone with an Nvidia Linux system that could test? -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Sketch Stick changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #11 from Sketch Stick --- Confirmed that it's still present in 4.1.1 and the latest nightly appimage. Grabbed a fresh video: https://sketchstick.com/temp/krita_flickering_4.2.webm -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Andrew Crouthamel changed: What|Removed |Added Status|REOPENED|RESOLVED CC||andrew.crouthamel@kdemail.n ||et Keywords||investigated, triaged Resolution|--- |FIXED --- Comment #10 from Andrew Crouthamel --- I can not reproduce this issue on 4.2.0, it appears this was fixed with the patch previously posted. Application Version: 4.2.0 KDE Plasma Version: 5.13.5 KDE Frameworks Version: 5.50.0 Qt Version: 5.11.1 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Boudewijn Remptchanged: What|Removed |Added CC||nez...@ymail.com --- Comment #9 from Boudewijn Rempt --- *** Bug 363957 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #8 from wolthera--- *** Bug 382660 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 woltherachanged: What|Removed |Added CC||andr...@andreasresch.at --- Comment #7 from wolthera --- *** Bug 382660 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Boudewijn Remptchanged: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 eliotJchanged: What|Removed |Added Keywords||regression CC||os...@jadamspam.pl -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Dmitry Kazakovchanged: What|Removed |Added Latest Commit||http://commits.kde.org/krit ||a/f114bcc1a2251d55cb3339548 ||9cc8d52c8f84ee6 Resolution|--- |FIXED Status|CONFIRMED |RESOLVED --- Comment #6 from Dmitry Kazakov --- Git commit f114bcc1a2251d55cb33395489cc8d52c8f84ee6 by Dmitry Kazakov. Committed on 14/05/2016 at 10:45. Pushed by dkazakov into branch 'master'. Fix flickering in the end of Lod0 recalculation The problem happened because openGL textures were painted without a full update. Basically, we shouldn't switch a texture tile from LodN to Lod0 mode with a partial update, because some part of the tile still has an old data, causing that weird flickering. So now we just issue *all* the GUI updates signals in one go, which basically updates all the tiles and then paints them on screen. See a comment in KisSuspendProjectionUpdatesStrokeStrategy. Fixes T2145 M +17 -6libs/image/kis_image.cc M +3-0libs/image/kis_stroke_strategy_factory.h M +26 -27 libs/image/kis_strokes_queue.cpp M +2-2libs/image/kis_strokes_queue.h M +121 -22 libs/image/kis_suspend_projection_updates_stroke_strategy.cpp M +5-2libs/image/kis_suspend_projection_updates_stroke_strategy.h M +2-2libs/image/kis_update_scheduler.cpp M +2-2libs/image/kis_update_scheduler.h http://commits.kde.org/krita/f114bcc1a2251d55cb33395489cc8d52c8f84ee6 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 --- Comment #5 from Boudewijn Rempt--- https://phabricator.kde.org/T2145 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Boudewijn Remptchanged: What|Removed |Added CC||b...@valdyas.org Status|UNCONFIRMED |CONFIRMED Ever confirmed|0 |1 --- Comment #4 from Boudewijn Rempt --- I see the original video is using 32f -- which means uploading the textures while not blocking redisplay is causing artefacts. -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Quiraltachanged: What|Removed |Added CC||rjquira...@gmail.com --- Comment #3 from Quiralta --- Same here, also Archlinux plus Nvidia proprietary driver. Unlike David's zooming doesn't change the behavior though. -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 David REVOYchanged: What|Removed |Added CC||i...@davidrevoy.com --- Comment #2 from David REVOY --- I get this behavior too. Note: On my install, the rendering issue totally disappear when using discrete zoom ( eg. 50% , 33% , etc... ) but I can reproduce the rendering issue when I use a random zoom ( eg. 43%, 36%). -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 361448] Brush strokes flicker when they finish rendering
https://bugs.kde.org/show_bug.cgi?id=361448 Raghavendra kamathchanged: What|Removed |Added CC||raghavendr.ra...@gmail.com --- Comment #1 from Raghavendra kamath --- I get this behaviour too on 3.0 -- You are receiving this mail because: You are watching all bug changes.