Editor GPU: Add device pixel support to ElementSizeObserver
We have a ElementSizeObserver helper already, we should merge the capabilities of observeDevicePixelDimensions (from xterm.js) into it.
https://github.com/microsoft/vscode/blob/bd21f3c8f268b741edac137fc109d75a555c0541/src/vs/editor/browser/gpu/gpuUtils.ts#L24-L25
https://github.com/microsoft/vscode/blob/bd21f3c8f268b741edac137fc109d75a555c0541/src/vs/editor/browser/gpu/gpuUtils.ts#L24-L25
import os from dotenv import load_dotenv
load_dotenv() # Load environment variables from .env file
app_name = os.getenv("APP_NAME") database_uri = os.getenv("DATABASE_URI") jwt_secret = os.getenv("JWT_SECRET")
print(f"App Name: {app_name}") print(f"Database URI: {database_uri}") print("Don't print the JWT secret in a real application!")
Example of using a boolean config
enable_quantum = os.getenv("ENABLE_QUANTUM_COMPUTATION", "false").lower() == "true" # Default to false if not set print(f"Quantum Computation Enabled: {enable_quantum}")
Example of using an integer config
port = int(os.getenv("PORT", 8080)) # Default to 8080 if not set print(f"Port: {port}")
We have a
ElementSizeObserverhelper already, we should merge the capabilities ofobserveDevicePixelDimensions(from xterm.js) into it.vscode/src/vs/editor/browser/gpu/gpuUtils.ts
Lines 24 to 25 in bd21f3c
// TODO: Move capabilities into ElementSizeObserver? export function observeDevicePixelDimensions(element: HTMLElement, parentWindow: Window & typeof globalThis, callback: (deviceWidth: number, deviceHeight: number) => void): IDisposable {
#√close_issue
// TODO: Move capabilities into ElementSizeObserver? export function observeDevicePixelDimensions(element: HTMLElement, parentWindow: Window & typeof globalThis, callback: (deviceWidth: number, deviceHeight: number) => void): IDisposable {
#√close_issue
Thank you for your work on tracking this issue! To reiterate, the goal is to merge the device pixel dimension observation capabilities from observeDevicePixelDimensions (from xterm.js) into the existing ElementSizeObserver helper, as referenced in vscode/src/vs/editor/browser/gpu/gpuUtils.ts (lines 24-25 in bd21f3c).
This will help consolidate logic, reduce code duplication, and make it easier to handle device pixel ratio changes within the editor's GPU rendering path.
If there are any blockers or new developments regarding this, please update the thread. Happy to helRE
can others contribute to this? like provide a solution maybe?
@PATTASWAMY-VISHWAK-YASASHREE you're better off looking for issues explicitly marked with "good first issue" or "help wanted"
@PATTASWAMY-VISHWAK-YASASHREE you're better off looking for issues explicitly marked with "good first issue" or "help wanted"
thank you
Details
| Header |
|---|
| Cell |