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

Allow partial expression evaluation on the CPU #15415

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jahow
Copy link
Contributor

@jahow jahow commented Dec 8, 2023

This PR adds support for evaluation expressions on the CPU with an incomplete context (e.g. no feature, no resolution, etc.). An UNKNOWN_VALUE constant is introduced; it will be returned whenever an expression evaluates to something that is not defined, for instance trying to read a property if no feature properties have been provided in the context.

This will be instrumental in preprocessing some parts of a style object for WebGL rendering (e.g. filters, string operations).

Rebased on #15414

Part of #15413

Note: this PR also improves the webgl fill/line pattern tests which were quite flakey

@jahow jahow force-pushed the partial-expression-cpu-evaluation branch from c768967 to 895e1b9 Compare December 8, 2023 14:22
Copy link

github-actions bot commented Dec 8, 2023

📦 Preview the website for this branch here: https://deploy-preview-15415--ol-site.netlify.app/.

@jahow jahow force-pushed the partial-expression-cpu-evaluation branch 5 times, most recently from 9d86980 to e1e015b Compare December 11, 2023 11:38
Evaluation contexts are now initialized with every properties set to
UNKNOWN_VALUE.

If an expression needs an input which is unknown, it will return UNKNOWN_VALUE.
Also added some tests for string assertion
@jahow jahow force-pushed the partial-expression-cpu-evaluation branch from e1e015b to 5bf1277 Compare December 14, 2023 08:57
This makes sure that icons are loaded before rendering
@jahow jahow force-pushed the partial-expression-cpu-evaluation branch from 5bf1277 to 7f1719b Compare December 14, 2023 09:34
@jahow
Copy link
Contributor Author

jahow commented Dec 14, 2023

This is ready for review, thanks in advance!

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.

None yet

1 participant