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

Make renderState better aware of passState during partialApply. #2824

Merged
merged 1 commit into from
Jun 21, 2015

Conversation

emackey
Copy link
Contributor

@emackey emackey commented Jun 20, 2015

This changes RenderState.partialApply to be more careful of specific changes to the passState that affect the current renderState. It attempts to keep all of the optimizations from the previous implementation except where they were so aggressive as to miss needed state changes.

With this change, the functions that apply the state transition between two renderStates are not allowed access to the passState at all. The passState is reconciled separately, and is always considered even if the renderStates were identical.

Looks like test coverage is missing from this area of the code, @pjcozzi said it might be hard to test. Perhaps a mock gl context could be constructed with spy listeners, but that likely won't happen for 1.11.

Fixes #2790
Fixes #2811

@emackey
Copy link
Contributor Author

emackey commented Jun 20, 2015

I also created a branch renderstate-debug with some hacked-in stats to report on how often the various branches in partialApply are applied or skipped. Type stat() at the console to see this.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 21, 2015

Thanks @emackey, this looks good.

pjcozzi added a commit that referenced this pull request Jun 21, 2015
Make renderState better aware of passState during partialApply.
@pjcozzi pjcozzi merged commit 969cdc3 into master Jun 21, 2015
@pjcozzi pjcozzi deleted the picking-issue branch June 21, 2015 17:32
@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 22, 2015

@emackey

@mramato
Copy link
Contributor

mramato commented Jun 22, 2015

FYI, I think @emackey it traveling until July 6th, not sure if he'll be checking email. If you want something in CHANGES for 1.11, you'll probably want to just update it yourself.

@emackey
Copy link
Contributor Author

emackey commented Jun 22, 2015

I moved renderstate-debug over to the emackey fork, to get it out of the main repo. Feel free to make any comments needed in CHANGES.md.

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.

3 participants