Bug 427833

Summary: Artifacts with isometric grid because of the outline
Product: [Applications] krita Reporter: Tiar <tamtamy.tymona>
Component: OpenGL CanvasAssignee: Tiar <tamtamy.tymona>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard
Priority: NOR Keywords: regression
Version: 4.4.0   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Video showing artifacts

Description Tiar 2020-10-16 19:53:15 UTC
Created attachment 132443 [details]
Video showing artifacts

SUMMARY
I get weird artifacts when trying to paint on 100x100 pixels canvas with OpenGL turned on and an isometric grid (standard settings). The artifacts happen inside the outline and where the outline already was. After a moment, a proper grid reappears. The artifacts look like skewed fragments of the grid (they have different angle than the actual grid).


STEPS TO REPRODUCE
1. Create 100x100 pixels canvas. 
2. Turn on "Show Grid", switch to "Isometric" in Grids & Guides docker.
3. Try to paint or just move the cursor around on the canvas.

OBSERVED RESULT
Artifacts show up.


EXPECTED RESULT
No artifacts.


SOFTWARE/OS VERSIONS
Krita

 Version: 4.4.0
 Languages: en_US, en, en_US, en, en_US, en, pl_PL, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.9.0-050900-generic
  Pretty Productname: Linux Mint 19.3
  Product Type: linuxmint
  Product Version: 19.3
  Desktop: X-Cinnamon

OpenGL Info
 
  Vendor:  "Intel Open Source Technology Center" 
  Renderer:  "Mesa DRI Intel(R) Iris(R) Plus Graphics (ICL GT2)" 
  Version:  "3.0 Mesa 20.0.8" 
  Shading language:  "1.30" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 15565 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 180
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Display Information
Number of screens: 1
	Screen: 0
		Name: eDP-1
		Depth: 24
		Scale: 2
		Resolution in pixels: 1920x1080
		Manufacturer: BOE
		Model: 
		Refresh Rate: 60
Comment 1 Ahab Greybeard 2020-10-19 14:23:24 UTC
I can confirm this with Debian 10 running the 4.4.0 and the Oct 18 4.4.1 alpha(git 6b4d1ed) appimages.
Some artifacts appear if not painting in and around the brush outline.

This does not happen with the 4.3.0 appimage.

Note the similarity with https://bugs.kde.org/show_bug.cgi?id=427658 which happens when canvas graphics acceleration is turned on, nut not when turned off.
(The isometric grid requires that canvas graphics acceleration is on.)
Comment 2 Tiar 2020-11-18 22:12:21 UTC
I can reproduce this reliably in appimages, but I cannot reproduce it ob my build system.

Last correct version appimage I have: 1ee63d5
First incorrect: e02f58a
Last one I checked (and still incorrect): 1c6b2b4
Comment 3 Tiar 2020-11-28 01:26:59 UTC
Git commit f7390142e507893a7d212a55380ff84220540aab by Agata Cacko.
Committed on 28/11/2020 at 01:26.
Pushed by tymond into branch 'master'.

Fix isometric grid with partial updates

Before this commit, isometric grid would drawn incorrectly
every time imageRect couldn't fit whole inside updateRect
(in case of zooming in on the cavas, for example, or after
partial updates implementation, also under the outline cursor).

This commit fixes that by making sure the drawing uses the
full imageRect for calculation.

M  +4    -0    libs/ui/canvas/kis_grid_decoration.cpp

https://invent.kde.org/graphics/krita/commit/f7390142e507893a7d212a55380ff84220540aab
Comment 4 Halla Rempt 2020-12-10 09:37:29 UTC
Git commit 01d1b3a17506c62b1a058aa5653ef9745dbe39ca by Boudewijn Rempt, on behalf of Agata Cacko.
Committed on 10/12/2020 at 09:37.
Pushed by rempt into branch 'krita/4.4.2'.

Fix isometric grid with partial updates

Before this commit, isometric grid would drawn incorrectly
every time imageRect couldn't fit whole inside updateRect
(in case of zooming in on the cavas, for example, or after
partial updates implementation, also under the outline cursor).

This commit fixes that by making sure the drawing uses the
full imageRect for calculation.
(cherry picked from commit f7390142e507893a7d212a55380ff84220540aab)

M  +4    -0    libs/ui/canvas/kis_grid_decoration.cpp

https://invent.kde.org/graphics/krita/commit/01d1b3a17506c62b1a058aa5653ef9745dbe39ca
Comment 5 Tiar 2020-12-14 15:40:02 UTC
Git commit 8600aba68c2390c3eef871f53b2f971382bc0847 by Agata Cacko.
Committed on 14/12/2020 at 15:39.
Pushed by tymond into branch 'krita/4.3'.

Fix isometric grid with partial updates

Before this commit, isometric grid would drawn incorrectly
every time imageRect couldn't fit whole inside updateRect
(in case of zooming in on the cavas, for example, or after
partial updates implementation, also under the outline cursor).

This commit fixes that by making sure the drawing uses the
full imageRect for calculation.

M  +4    -0    libs/ui/canvas/kis_grid_decoration.cpp

https://invent.kde.org/graphics/krita/commit/8600aba68c2390c3eef871f53b2f971382bc0847