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

Fix webgl erase. Resolves #6523 #6524

Merged
merged 4 commits into from
Nov 3, 2023

Conversation

acamposuribe
Copy link
Contributor

Resolves #6523

Changes:
Changes to the erase() and noErase() functions in the webgl renderer.
In the erase() function

  • Activate isErasing at the beginning
  • Update _cachedBlendMode with current BlendMode (if omitted, it does not pass npm test)
  • Change blendMode to constants.REMOVE mode

In the noErase() function

  • Store currentBlendMode in temp
  • Change blendMode back to the original (cached)
  • Set cached to temp. If we don't do this, when applying the new blendmode (applyBlendMode()), the function returns null
  • Apply original blendMode and set cached again to the original (to pass npm test)

This is all very confusing, but it's the only way of making it work without refactoring the whole thing.

PR Checklist

  • npm run lint passes

Copy link

welcome bot commented Nov 3, 2023

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for fixing this and diving into the renderer internals!

@davepagurek davepagurek merged commit c0af525 into processing:main Nov 3, 2023
2 checks passed
@davepagurek
Copy link
Contributor

@all-contributors please add @acamposuribe for bug, code

Copy link
Contributor

@davepagurek

I've put up a pull request to add @acamposuribe! 🎉

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

Successfully merging this pull request may close these issues.

erase() and noErase() support in framebuffers
2 participants