Path caching: store based on relevant state
As in, fill(path, 1); setLineWidth(5); fill(path, 1); is now two
entries in the cache for 'path' within group 1, each with its own
vertex data, not one.
Peviously it was only the last one that was kept. (in the example,
the vertex data for stroke width 5)
This increases the level of reuse (and the usefulness of path caching)
in draw sequences where the stroke width, AA, line cap/join are changed
one or more times between filling or stroking the same QCanvasPath.
It is also a prerequisite for any GPU buffer-based caching.
They key change is that the renderer's
isPathCached(group, path)
is now replaced by
isPathCachedForFill(group, path, { antialias, renderhints })
and
isPathCachedForStroke(group, path, {antialias, strokeWidth, cap, join,
renderhints })
doing what the signature suggest: the result is true only if the path
in the group was already used for a fill or stroke with the given
state.
Pick-to: 6.11
Change-Id: Id56073ae42383e2336c5c984c31fe29038a56150
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>