-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Open
Labels
debtCode quality issuesCode quality issueseditor-gpuEditor GPU rendering related issuesEditor GPU rendering related issues
Milestone
Description
These should be co-located
vscode/src/vs/editor/browser/gpu/viewGpuContext.ts
Lines 251 to 268 in e7fb282
| /** | |
| * A list of supported decoration CSS rules that can be used in the GPU renderer. | |
| */ | |
| const gpuSupportedDecorationCssRules = [ | |
| 'color', | |
| 'font-weight', | |
| 'opacity', | |
| ]; | |
| function supportsCssRule(rule: string, style: CSSStyleDeclaration) { | |
| if (!gpuSupportedDecorationCssRules.includes(rule)) { | |
| return false; | |
| } | |
| // Check for values that aren't supported | |
| switch (rule) { | |
| default: return true; | |
| } | |
| } |
vscode/src/vs/editor/browser/gpu/renderStrategy/fullFileRenderStrategy.ts
Lines 395 to 409 in e7fb282
| 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); | |
| } | |
| decorationStyleSetColor = parsedColor.toNumber32Bit(); | |
| break; | |
| } | |
| case 'font-weight': { | |
| const parsedValue = parseCssFontWeight(value); | |
| if (parsedValue >= 400) { | |
| decorationStyleSetBold = true; |
Metadata
Metadata
Labels
debtCode quality issuesCode quality issueseditor-gpuEditor GPU rendering related issuesEditor GPU rendering related issues
Type
Projects
Status
No status