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

chore(mapbox) use props.device instead of props.gl #8554

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisgervang
Copy link
Collaborator

For #8553

Change List

  • Use props.device

Signed-off-by: Chris Gervang <chris@gervang.com>
@@ -50,7 +51,7 @@ export function getDeckInstance({

let deckInstance: Deck;

if (!deck || deck.props.gl === gl) {
if (!deck || (deck.props.device instanceof WebGLDevice && deck.props.device.gl === gl)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume the instanceof check here is just to keep Typescript happy? What happens if it is a WebGPUDevice? Would it maybe be safer to check for WebGPUDevice at the start of this function and exit early with a warning?

@@ -50,7 +51,7 @@ export function getDeckInstance({

let deckInstance: Deck;

if (!deck || deck.props.gl === gl) {
if (!deck || (deck.props.device instanceof WebGLDevice && deck.props.device.gl === gl)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will break the check. Note you are checking deck.props which is constructed below at line 59. Only gl is passed, not device.

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.

None yet

3 participants