Implement exactBoundsAmortized() method for paint devices
This method is supposed to be used in hot-spot places where exactBounds() is desirable, but extensive calculations may affect the performace. It returns exactBounds() of the device, but limits expensive exact bounds recalculations (if needed) to happen not more often than once a second. If the cache is dirty and we recalculated it too recently, exactBoundsAmortized() will return extent() of the paint device, which is perfectly fine in a lot of cases. It allows using exactBoundsAmortized() in the projection merging code, where this method can be called for the device being painted at the moment, which exact bounds changes constantly. CC:kimageshop@kde.org
parent
96bc05ad
Please register or sign in to comment