Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canvas: fix restore() with existing SMask groups and re-land #12363. #12369

Merged
merged 2 commits into from
Sep 15, 2020

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Sep 12, 2020

This fixes #12367. When we end the SMask group and stateStack.length is zero,
nothing updates this.current to reflect it.

…stateStack is empty.

This fixes the issue that caused mozilla#12363 to get reverted, see mozilla#12367.
When we end the SMask group and stateStack.length is zero, nothing updates
this.current to reflect it.
…Drawing.

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 re-lands mozilla#12363 and fixes Mozilla bug 1664178[1].

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1664178
@emilio emilio changed the title canvas: restore() should reflect that smask groups are finished when stateStack is empty. canvas: fix restore() with existing SMask groups and re-land #12363. Sep 12, 2020
@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 1

Live output at: http://54.215.176.217:8877/fe62fda808cffe1/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_test from @timvandermeij received. Current queue size: 1

Live output at: http://54.67.70.0:8877/9ab00d5ad167ba3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/9ab00d5ad167ba3/output.txt

Total script time: 27.33 mins

  • Font tests: Passed
  • Unit tests: FAILED
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/9ab00d5ad167ba3/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/fe62fda808cffe1/output.txt

Total script time: 31.52 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.215.176.217:8877/fe62fda808cffe1/reftest-analyzer.html#web=eq.log

@emilio
Copy link
Contributor Author

emilio commented Sep 15, 2020

Seems like the same kind of subpixel differences as in #12369.

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/8c1865f0aa2753b/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/8c1865f0aa2753b/output.txt

Total script time: 3.50 mins

Published

@timvandermeij timvandermeij merged commit 558d387 into mozilla:master Sep 15, 2020
@timvandermeij
Copy link
Contributor

Thank you! I have verified that the original issue that caused the backout is fixed now, and the code looks better like this.

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 1

Live output at: http://54.215.176.217:8877/f0acda3c82600d3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/d63cb7eb8b8146f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/d63cb7eb8b8146f/output.txt

Total script time: 25.67 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/f0acda3c82600d3/output.txt

Total script time: 30.26 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@emilio emilio deleted the better-cancelation-follow-up branch September 15, 2020 22:47
@emilio
Copy link
Contributor Author

emilio commented Sep 15, 2020

Np, thanks a lot for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix or revert PR #12363
3 participants