-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Implement rectangle renderer and gpu rulers view part #228632
Conversation
} | ||
|
||
register(x: number, y: number, width: number, height: number, red: number, green: number, blue: number, alpha: number): IObjectCollectionBufferEntry<RectangleRendererEntrySpec> { | ||
// TODO: Expand buffer if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// --- end event handlers | ||
|
||
private _update() { | ||
// TODO: Only write dirty range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const rulers = this._viewGpuContext | ||
? new RulersGpu(this._context, this._viewGpuContext) | ||
: new Rulers(this._context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hediet FYI this is how the other ruler's implementation is being added, similar to ViewLinesGpu
but the DOM one isn't being instantiated at all.
const options = this._context.configuration.options; | ||
const rulers = options.get(EditorOption.rulers); | ||
const typicalHalfwidthCharacterWidth = options.get(EditorOption.fontInfo).typicalHalfwidthCharacterWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least for rulers, there isn't much opportunity to share code with the DOM implementation.
Fixes #221211
Also respects scroll left for character rendering.