Do not invalidate when using the path both as cached and uncached
Consider the following sequence with QCanvasPath p:
(1) stroke(p, 123)
(2) stroke(p, -1)
(3) stroke(p, 123)
Call (3) could just use the cached data (1) generates. Yet currently the
in-between call with group -1 triggers an update of the geometry in
call (3), for no good reason.
To remedy this, try not to mix the the handling of uncached (group ==
-1) and cached paths together. QCCachedPath and
ctx.cachedStroke/FillPaths should be reserved for cached paths, and not
touched in any way when the path group is -1.
Rather, store the command count and generation for the uncached case in
the QCContext, handling them the same way as preparedPath and
preparedPathTransform.
Pick-to: 6.11
Change-Id: I96185b6569507807df7c3678954bc177759f13af
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>