-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Reset context on resurface #1293
Conversation
Really like the direction this is headed 👍. Hope to read it more closely tonight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Sorry for being slow to review. Just a few little bits of suggested cleanup, but otherwise good with me to land!
Added some commits and rebased onto master. I'll add Checking if one Two questions: the BMP PR added a line into the changelog section for 2.1.0, but it landed after 2.1.0, right? I can move it in the unreleased section, if that is the case. Another question: tests |
Yeah, appears so. Thanks for finding.
I don't think increasing the timeout is the right thing to do (they shouldn't take more than 2000 ms, unless the host has some I/O issue with slow font loading?). I've only seen them be flaky in CI, not locally. Not sure what the answer is there. I guess we could try increasing the timeout in a branch and run CI a bunch of times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
|
||
int stride = canvas->stride(); | ||
double Bpp = static_cast<double>(stride) / canvas->getWidth(); | ||
int nBytes = static_cast<int>(Bpp * width * height + .5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this also fixes a bug in the original JS impl. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!! Thank you for the huge improvement 👏
I've left some small comments, but they don't have to block the merge, I can fix them later if you would prefer that 🎉
Awesome 👏 |
Thank you for this 🚀 |
Fixes #1292
Did a lot of refactoring.
If any of these is better to stay as it was implemented before, I can revert it:
__defineGetter__
withdefineProperty
_updateStateInfo
to track when the surface gets resetlastFillStyle
and similar properties