-
Notifications
You must be signed in to change notification settings - Fork 10.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
Preventing from using the same canvas for multiple render() #8519
Conversation
src/display/api.js
Outdated
} | ||
|
||
InternalRenderTask.prototype = { | ||
|
||
initializeGraphics: | ||
function InternalRenderTask_initializeGraphics(transparency) { | ||
|
||
if (this._canvas) { | ||
console.log(this._canvas); |
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.
Nit: remove the left-over debug print
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://54.67.70.0:8877/4562fe720cfea3a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 1 Live output at: http://54.215.176.217:8877/1c45e29b97fb97e/output.txt |
test/unit/api_spec.js
Outdated
|
||
Promise.all([ | ||
renderTask1.promise, | ||
renderTask2.then(() => { |
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.
Nit: renderTask2.promise.then
for consistency?
src/display/api.js
Outdated
if (this._canvas) { | ||
if (canvasInRendering.has(this._canvas)) { | ||
throw new Error( | ||
'Cannot use the same canvas during multiple render() operations.' + |
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.
Nit: add a space at the end of this string, to avoid it reading:
... operations.Use different...
.
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/4562fe720cfea3a/output.txt Total script time: 17.11 mins
|
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/1c45e29b97fb97e/output.txt Total script time: 0.21 mins |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/45c4e6839b24674/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/b10cab745e3def5/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/45c4e6839b24674/output.txt Total script time: 17.16 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/b10cab745e3def5/output.txt Total script time: 30.14 mins
|
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 good, thank you for the patch!
Preventing from using the same canvas for multiple render()
Attempt to make life less confusing (#8476)
Fixes #5636