Diffusion Krita 9be377ae3fe8

Fix crash after cropping a specific image

Authored by dkazakov on Sep 6 2019, 1:44 PM.

Description

Fix crash after cropping a specific image

This patch ends the era of the custom "empty extent" value
QRect(quint32_MAX, quint32_MAX, 0, 0). When I started refactoring
tile engine ten years ago in 2009, this "empty extent" flag was
already present. It was just a result of the way how extent was
calculated those days. I guess it was also considered as
an "optimization", or as "a flag" that could ease debugging a bit
(and it actually did help debugging a couple of times).

Years passed by and I considered to remove this custom value multiple
times. It was always causing troubles, because the QRect is not safe
against integer oveflows. But the problem was, there was code outside
tiles engine that relied on this behavior. So I was always scared of
the actual removal. Even when the tile engine was rewritten again
to become lockfree in 2017, I insisted on keeping the old behavior...

So, it looks like now all code that relies on this custom value is gone,
so it should be safe to remove it.

Funny side, I guess it was one of few artifacts that were still kept
in Krita since 'tiles' and 'tiles_new' days (has anyone ever wondered
why the engine's folder is called 'tiles3'?) ;)

BUG:411536

Details

Committed
dkazakovSep 13 2019, 9:00 AM
Parents
R37:0f4e2c53220c: Remove unused code
Branches
Unknown
Tags
Unknown