Skip to content
Commit 0f9c5472 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

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
parent 46cc3890
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment