Skip to content

Commit

Permalink
fix(webgl): Fix WebGLCanvasContext.resize() (#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Aug 8, 2023
1 parent 36a0c55 commit e748267
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/webgl/src/adapter/webgl-canvas-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class WebGLCanvasContext extends CanvasContext {
resize(options?: {width?: number; height?: number; useDevicePixels?: boolean | number}): void {
// Resize browser context .
if (this.canvas) {
const devicePixelRatio = this.getDevicePixelRatio(options?.useDevicePixels);
this.setDevicePixelRatio(devicePixelRatio, options);
return;
}
Expand All @@ -64,7 +65,7 @@ export class WebGLCanvasContext extends CanvasContext {
}

commit() {
// gl.commit was ultimately removed from standard??
// gl.commit was ultimately removed from the WebGL standard??
// if (this.offScreen && this.gl.commit) {
// // @ts-expect-error gl.commit is not officially part of WebGLRenderingContext
// this.gl.commit();
Expand Down

0 comments on commit e748267

Please sign in to comment.