-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGPURenderer: Pipelines - Clean up. #28495
Conversation
@@ -67,7 +67,7 @@ class Pipelines extends DataMap { | |||
|
|||
if ( pipeline === undefined ) { | |||
|
|||
if ( previousPipeline && previousPipeline.usedTimes === 0 ) this._releasePipeline( computeNode ); | |||
if ( previousPipeline && previousPipeline.usedTimes === 0 ) this._releasePipeline( previousPipeline ); |
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.
I think this is just a typo? this._releasePipeline
takes a pipeline and uses its cacheKey
property to remove it from this.caches
.
@@ -205,7 +205,7 @@ class Pipelines extends DataMap { | |||
|
|||
} | |||
|
|||
super.delete( object ); | |||
return super.delete( object ); |
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 method is overriding DataMap.delete
which returns the value for the deleted key. For consistency with how the base method works, it seems best to continue returning the deleted value.
1c4e8d3
to
83783da
Compare
@@ -22,6 +22,8 @@ class Attributes extends DataMap { | |||
|
|||
} | |||
|
|||
return attributeData; |
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.
Updated another case where DataMap.delete
is being overridden.
Related issue: N/A
Description
See comments explaining each change.