Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Allowed for retrieving GPU objects. #424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allowed for retrieving GPU objects. #424

wants to merge 1 commit into from

Conversation

chihuahua
Copy link
Contributor

Refactored Playback to allow for retrieving GPU objects of a desired type. This makes it feasible to, for instance, list the textures up to a certain step. The object mapping was changed from (handle to object) to (type of object to object handle to object).

@ghost ghost assigned benvanik Aug 14, 2013
// Do not clear cached programs.
this.clearGpuResource_(this.objects_[objectKey]);
for (var objectType in this.objects_) {
objectType = /** @type {wtf.replay.graphics.Playback.GPU_OBJECT_} */ (
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this required? I thought the compiler would pick up on this - lame if it doesn't :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The compiler seems to view objectType as a string ... does this casting actually incur overhead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Lame - they should be able to know the key type - oh well. No runtime overhead, just cognitive overhead while reading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, looks like lint notes that I have to use parseInt instead of just casting...

Refactored Playback to allow for retrieving GPU objects of desired type. This makes it feasible to, for instance, list the textures up to a certain step. The object mapping was changed from (handle to object) to (type of object to object handle to object).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants