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

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