Update fill and stroke style only when required

So far fill and stroke style updates have been sent to the canvas paint
thread by `SetFillStyle()` and `SetStrokeStyle()`. This resulted in
fill/stroke style updates not being considered by the canvas paint
thread between the latest call of `SetFillStyle()`/`SetStrokeStyle()` and
the drawing operation (e.g. fill or stroke).

This issue is solved by making `SetFillStyle()` and `SetStrokeStyle()`
update the local canvas state and propagating the state to the canvas
paint thread right before any drawing operation that requires it.
This commit is contained in:
pylbrecht 2020-01-25 19:36:02 +01:00
parent 937efba0cd
commit ebdf4693ab
5 changed files with 23 additions and 35 deletions

View file

@ -1,5 +0,0 @@
[2d.gradient.object.update.html]
type: testharness
[Canvas test: 2d.gradient.object.update]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.pattern.animated.gif.html]
[createPattern() of an animated GIF draws the first frame]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.gradient.object.update.html]
[OffscreenCanvas test: 2d.gradient.object.update]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.gradient.object.update.worker.html]
[2d]
expected: FAIL