-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smaller footprint webgl feature test, recomended by chrome webgl team.
- Loading branch information
Showing
1 changed file
with
1 addition
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9c0ca33
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.
Here are more details on this test from one of chrome's webgl engineers:
just for reference.
9c0ca33
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.
Just so I have it straight: the new window.WebGLRenderingContext is more reliable, yes? Does it init a context (and make pages swap), or not?
9c0ca33
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.
Less reliable as it doesnt init a context.
But less crashy and much faster and doesnt use up 4mb of memory that the normal one does.
So.. currently it's a hint that there may be native support.
And.... that's probably the best we can do for now.
9c0ca33
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.
What about returning "maybe" if that test passes, much like the video codec support works?
9c0ca33
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.
I like that idea, Ryan. I'm fine with this being the best we can do for now, even if "for now" ends up being a long-term case. Returning "maybe" sounds great to me because it allows you to decide whether or not to do more determinate testing if you plan to actually use WebGL—which you should do in that case anyway—but it won't interfere or cause unwanted side-effects for all other situations.
9c0ca33
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.
9c0ca33
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.
It does both I believe, "probably" if it's more confident, and "maybe" if it might be supported.
9c0ca33
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.
I think slex was just clarifying the semantics of the possible choices. :) from my experience the canPlayType() api returns probably if it would normally be a maybe but you also specified the codecs...
maybe there is an additional weak test we could do in the future... so thus we'd want to start out with
maybe
maybe...
;)