Skip to content
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

fix(webgl): Prevent auto resizing when using external gl context (9.0-release) #2296

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

Pessimistress
Copy link
Collaborator

For #2295

Change List

  • Disable autoResize when using an external WebGL context
  • cssToDeviceRatio() fallback to canvas clientWidth when dimension cache is unavailable (this happens when resize() is never called)

@@ -203,7 +203,8 @@ ${device.info.vendor}, ${device.info.renderer} for canvas: ${device.canvasContex

// Create and instrument context
const canvas = props.gl?.canvas || props.canvas;
this.canvasContext = new WebGLCanvasContext(this, {...props, canvas});
const autoResize = !props.gl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is autoResize possibly overridden by the user in device props?

@ibgreen ibgreen merged commit 1be3014 into 9.0-release Dec 9, 2024
2 checks passed
@ibgreen ibgreen deleted the x/context-resize-90 branch December 9, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants