canvas: Properly restore all the remaining items in stateStack in endDrawing.
We were correctly finishing the SMask group but not restoring all the extra transformations applied in stateStack, so if somebody ends up drawing to the same context after canceling mid-draw we'd get artifacts. This fixes Mozilla bug 1664178[1]. [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1664178
This commit is contained in:
parent
aef3fedc29
commit
ef1e9a1a3e
@ -1009,8 +1009,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
|
|
||||||
endDrawing: function CanvasGraphics_endDrawing() {
|
endDrawing: function CanvasGraphics_endDrawing() {
|
||||||
// Finishing all opened operations such as SMask group painting.
|
// Finishing all opened operations such as SMask group painting.
|
||||||
if (this.current.activeSMask !== null) {
|
while (this.stateStack.length || this.current.activeSMask !== null) {
|
||||||
this.endSMaskGroup();
|
this.restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ctx.restore();
|
this.ctx.restore();
|
||||||
|
Loading…
Reference in New Issue
Block a user