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

Commits on Sep 12, 2020

  1. canvas: restore() should reflect that smask groups are finished when …

    …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.
    emilio committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    3a277f3 View commit details
    Browse the repository at this point in the history
  2. canvas: Properly restore all the remaining items in stateStack in end…

    …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 committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    bf8b1ad View commit details
    Browse the repository at this point in the history