Skip to content
  • Dmitry Kazakov's avatar
    Fix crash after cropping a specific image · 0f9c5472
    Dmitry Kazakov authored
    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
    0f9c5472