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

Transparent GLKView #3096

Merged
merged 1 commit into from
Jan 5, 2016
Merged

Transparent GLKView #3096

merged 1 commit into from
Jan 5, 2016

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Nov 21, 2015

Set the GLKView’s layer to be non-opaque. In rudimentary testing, this appears to have no noticeable performance impact on styles that have opaque background layers (which should be the vast majority of styles). Any performance impact I’m seeing with a transparent background style layer appears to be due to content beneath the map view.

transparent

Fixes #3038.

/cc @incanus

@1ec5 1ec5 added feature iOS Mapbox Maps SDK for iOS labels Nov 21, 2015
@1ec5 1ec5 self-assigned this Nov 21, 2015
@1ec5 1ec5 added this to the ios-v3.1.0 milestone Nov 21, 2015
@incanus
Copy link
Contributor

incanus commented Nov 21, 2015

Neat. Will test. One thing that jumps out is possible performance implications of a non-opaque backing layer all the time.

@incanus
Copy link
Contributor

incanus commented Nov 21, 2015

... which you mentioned 😄

@1ec5
Copy link
Contributor Author

1ec5 commented Nov 21, 2015

Yes, I haven’t profiled the difference, and in particular I haven’t tried this out on older hardware, but it isn’t nearly as bad as I feared.

@1ec5
Copy link
Contributor Author

1ec5 commented Nov 21, 2015

If there does turn out to be a significant performance impact, we can also make the transparency optional, by tying it to -[UIView isOpaque].

@friedbunny
Copy link
Contributor

Going to rebase locally and try to quantify performance impact, see if I can find anything that would keep us from merging this.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 4, 2016

If we honor -[UIView isOpaque], which is YES by default, there will be no performance impact in the usual case.

@friedbunny
Copy link
Contributor

Found an unrelated, strange rendering issue with translucent water polygons, but this PR seems solid. 👍

@1ec5 1ec5 force-pushed the 1ec5-transparency-3038 branch from c246ff0 to 100ae19 Compare January 5, 2016 17:59
Tie layer opacity to view opacity.

Fixes #3038.
@1ec5 1ec5 force-pushed the 1ec5-transparency-3038 branch from 100ae19 to 5f58c01 Compare January 5, 2016 18:01
@1ec5 1ec5 merged commit 5f58c01 into master Jan 5, 2016
@1ec5 1ec5 removed the in progress label Jan 5, 2016
@1ec5 1ec5 deleted the 1ec5-transparency-3038 branch January 5, 2016 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants