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

Editor GPU: Move decoration style parsing and validation into ViewGpuContext #234432

Open
Tyriar opened this issue Nov 22, 2024 · 0 comments
Open
Assignees
Labels
editor-gpu Editor GPU rendering related issues plan-item VS Code - planned item for upcoming

Comments

@Tyriar
Copy link
Member

Tyriar commented Nov 22, 2024

This should move into ViewGpuContext so lines with inline decorations that aren't supported don't make it that far:

for (const rule of rules) {
for (const r of rule.style) {
const value = rule.styleMap.get(r)?.toString() ?? '';
switch (r) {
case 'color': {
// TODO: This parsing and error handling should move into canRender so fallback
// to DOM works
const parsedColor = Color.Format.CSS.parse(value);
if (!parsedColor) {
throw new BugIndicatingError('Invalid color format ' + value);
}
charMetadata = parsedColor.toNumber24Bit();
break;
}
default: throw new BugIndicatingError('Unexpected inline decoration style');
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-gpu Editor GPU rendering related issues plan-item VS Code - planned item for upcoming
Projects
Status: No status
Development

No branches or pull requests

1 participant