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(canvas.renderAll): setDimensions edge case #7646

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

ShaMan123
Copy link
Contributor

@ShaMan123 ShaMan123 commented Feb 3, 2022

Motivation:
#6112

The flag hasLostContext is turned on here:

this.hasLostContext = true;

And is never turned off.
And that seems to be the problem.

closes #6112

@ShaMan123 ShaMan123 changed the title fix(canvas.setDimensions): renderAll edge case fix(canvas.renderAll): setDimensions edge case Feb 3, 2022
@ShaMan123 ShaMan123 changed the title fix(canvas.renderAll): setDimensions edge case fix(canvas.renderAll): setDimensions edge case Feb 3, 2022
@ShaMan123 ShaMan123 requested a review from asturur February 3, 2022 07:42
@ShaMan123
Copy link
Contributor Author

Thanks @yassilah for the excellent repro that made it easy to triage this bug

Originally posted by @yassilah in #6112 (comment)

@asturur
Copy link
Member

asturur commented Feb 3, 2022

What the hell was hasLostContext

@asturur
Copy link
Member

asturur commented Feb 3, 2022

So basically after a first resize change, we have been doing non useful redrawing each render cycle.

@asturur
Copy link
Member

asturur commented Feb 3, 2022

@ShaMan123 you should make branch on the main repo, would be easier to add tests for me!

@asturur asturur merged commit b857753 into fabricjs:master Feb 3, 2022
@asturur
Copy link
Member

asturur commented Feb 3, 2022

Thank you this is a great fix

@ShaMan123 ShaMan123 deleted the fix-set_dims+render_loop branch February 4, 2022 07:52
@ShaMan123
Copy link
Contributor Author

ShaMan123 commented Feb 4, 2022

@ShaMan123 you should make branch on the main repo, would be easier to add tests for me!

I have tried in the past. Git goes crazy. Puts branches in headless state and blocks me from working on upstream.

@asturur asturur mentioned this pull request Feb 4, 2022
@asturur
Copy link
Member

asturur commented Feb 4, 2022

clone everything in a new folder, maybe that fixes it.

@yassilah
Copy link
Contributor

yassilah commented Feb 4, 2022

Thanks @yassilah for the excellent repro that made it easy to triage this bug

Originally posted by @yassilah in #6112 (comment)

Happy to have helped! 🙂

@asturur
Copy link
Member

asturur commented Feb 5, 2022

Thanks @yassilah for the excellent repro that made it easy to triage this bug
Originally posted by @yassilah in #6112 (comment)

Happy to have helped! 🙂

Yep a good reproducible case is often the best help to expedite things

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.

requestAnimFrame + setDimensions = Flickering on selection background color
3 participants