Make sure the clipPath is retained as state of Context2D
authorUlf Hermann <ulf.hermann@digia.com>
Fri, 11 Apr 2014 15:28:52 +0000 (17:28 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 18 Apr 2014 05:39:25 +0000 (07:39 +0200)
commitdc051f28b865e54d3834824ffea6f2562f0836c1
treed70cde4e23112ccc256a62408d5e29829452e6e6
parent2776d48b7a1586518e9add43f723ecc6987f4418
Make sure the clipPath is retained as state of Context2D

The W3C spec doesn't say anything about the clip path getting reset
automatically at any point and so I guess we should retain it. This of
course is terribly annoying if the canvas element gets resized and ends
up with a default clipPath that doesn't match the canvas anymore. You
basically have to call reset() in every onPaint now. However, this just
highlights a general problem with stateful canvas contexts and we cannot
ignore user defined clipPaths like this.

Task-number: QTBUG-38297
Change-Id: I233226af6458298ef3d752d08ecdebebae2e0a8f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp