Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[ios] Ensure glFinish is called when going into the background, and block rendering in the background - #14439

Merged
julianrex merged 3 commits into
masterfrom
jrex/stop-background-rendering
Apr 17, 2019
Merged

julianrex merged 3 commits into
masterfrom
jrex/stop-background-rendering

Conversation

@julianrex

@julianrex julianrex commented Apr 16, 2019 •

Copy link
Copy Markdown
Contributor

This PR partly addresses https://github.com/mapbox/mapbox-gl-native/issues/13821.

This PR should be considered a stepping-stone towards a larger PR: #14222 (that is still on-going).

  • Now takes snapshot in resign active (to avoid GL display being called in background)
  • Fixes a couple of checks for _rendererFrontend
  • Blocks rendering (called from updateFromDisplayLink:) if in the background (and background rendering not supported).

This PR does not fix the bug where updateFromDisplayLink can be called in the background (that's in scope of #14222).
In addition, updateFromDisplayLink is currently called from inactive states (e.g. between resigning and entering the background) - this is something we may want to stop doing.

/cc @zugaldia @chloekraw

@julianrex julianrex added iOS Mapbox Maps SDK for iOS rendering labels Apr 16, 2019
@julianrex
julianrex marked this pull request as ready for review April 16, 2019 18:03
@julianrex
julianrex requested review from a team and fabian-guerra April 16, 2019 18:03

@fabian-guerra fabian-guerra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍🏼

[self sleepGL:notification];
}

- (void)willEnterForeground:(NSNotification *)notification

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As we discussed this will make a come back in a future PR #14222

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS rendering

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants