|
This patch introduces 2 versions of QGeoPath/polygon private:
a lazy version (default) and an eager version.
The reason is that certain classes such as MapItems make heavy use
of the bounding box of the geoshapes, as well as the contains
method, and in those cases it's beneficial to have it eagerly
computed and cached.
Other use cases do not see this feature so much in use, and the added
costs, both in terms of computation and in terms of memory requirements
for cached data can be avoided.
As the patch currently stands, using copy constructors for
QGeoPath and QGeoPolygon with a QGeoPathEager and a QGeoPolygonEager
(and vice-versa) changes the type of d_ptr.
This means that doing, for example, QGeoPath(someQGeoPathEager)
effectively returns a QGeoPath that behaves like a QGeoPathEager
(although not being one).
Change-Id: I8cfed1e0a747139d0fb6d5fb5236bf5f5fbf24c1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|