Avoid garbage collection in webgl decoration hot code

Part of #4079
This commit is contained in:
Daniel Imms
2022-08-27 20:06:58 -07:00
parent 3105797da1
commit 5e3f63e876
5 changed files with 94 additions and 34 deletions
+5
View File
@@ -308,6 +308,11 @@ export interface IDecorationService extends IDisposable {
getDecorationsAtLine(line: number): IterableIterator<IInternalDecoration>;
/** Iterates over the decorations at a cell (in no particular order). */
getDecorationsAtCell(x: number, line: number, layer?: 'bottom' | 'top'): IterableIterator<IInternalDecoration>;
/**
* Trigger a callback over the decoration at a cell (in no particular order). This is a high
* performance, but less ergonomic, version of {@link getDecorationsAtCell}.
*/
forEachDecorationAtCell(x: number, line: number, layer: 'bottom' | 'top' | undefined, callback: (decoration: IInternalDecoration) => void): void;
}
export interface IInternalDecoration extends IDecoration {
readonly options: IDecorationOptions;