Skip to content

Bugfix: Artifact with more than one active assitant

Sharaf Zaman requested to merge szaman/krita:bug-401940-canvas-artifact into master

Problem: With more than one assitants active on canvas, often on devices with high resolution the Pixmap cache would fill up immediately. This would internally trigger glDeleteTexture right after the first pixmap is rendered and when turn for second pixmap is due, it would get assigned the same name as the previously generated (which is a correct behavior! but it only seems to happen with some drivers). With same name as previous one Qt doesn't render it (see QOpenGL2PaintEngineExPrivate::updateTexture).

Workaround: Because of this name clash, we workaround this Qt bug by increasing the cache size, so the new textures don't immediately delete the previous ones and take their names. Ideally, this should be fixed inside Qt.

Devices with this problem:

  • Android
  • ChromeOS (mesa)
  • Windows (ANGLE)

Test Plan

To easily reproduce, try canvas only mode (that easily triggers cache removals).

BUG:401940

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports