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: Reduce WebGL checks to reduce instances of Rats! error #728

Merged
merged 1 commit into from
Mar 22, 2018

Conversation

tonyjin
Copy link
Contributor

@tonyjin tonyjin commented Mar 20, 2018

We don't use metrics associated with whether the user's browser supports WebGL or 3D rendering, so this removes the WebGL checks from the browser info check for every Preview instance and isolates them to 3D and 360 files, which should reduce instances of the Rats! WebGL hit a snag. error.

@boxcla
Copy link

boxcla commented Mar 20, 2018

Verified that @tonyjin has signed the CLA. Thanks for the pull request!

@@ -184,7 +184,7 @@ class Browser {
if (!gl) {
const canvas = document.createElement('canvas');
// Should stop 'Rats! WebGL hit a snag' error when checking WebGL support
canvas.addEventListener(EVENT_WEBGL_CONEXT_LOST, (e) => {
canvas.addEventListener(EVENT_WEBGL_CONTEXT_LOST, (e) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the supportsWebGL global variable?

Copy link
Contributor Author

@tonyjin tonyjin Mar 22, 2018

Choose a reason for hiding this comment

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

Will still be useful if someone is viewing a folder that has multiple 3D/360 files since that result will be cached between previews.

We don't use metrics associated with whether the user's browser supports WebGL or 3D rendering, so this removes the WebGL checks from the browser info check for every Preview instance and isolates them to 3D and 360 files, which should reduce instances of the `Rats! WebGL hit a snag.` error.
@tonyjin tonyjin force-pushed the reduce-webgl-checks branch from c99e707 to e10b9ed Compare March 22, 2018 21:50
@tonyjin tonyjin merged commit f2b389f into box:master Mar 22, 2018
@tonyjin tonyjin deleted the reduce-webgl-checks branch March 22, 2018 22:54
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.

5 participants