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

[core] Failed sprite requests do not block tiles rendering #14605

Merged
merged 2 commits into from
May 9, 2019

Conversation

pozdnyakov
Copy link
Contributor

This patch unblocks tiles rendering if a sprite request has failed, it also enables onStyleImageMissing API call for the missing image.

Fixes #14582

@tmpsantos
Copy link
Contributor

Worth mentioning that this aligns the behavior with GL JS and we could have a render test for this.

/cc @asheemmamoowala

Copy link
Contributor

@tmpsantos tmpsantos left a comment

Choose a reason for hiding this comment

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

LGTM, @pozdnyakov will follow-up with tests.

@@ -309,6 +309,9 @@ void Style::Impl::onSpriteError(std::exception_ptr error) {
lastError = error;
Log::Error(Event::Style, "Failed to load sprite: %s", util::toString(error).c_str());
observer->onResourceError(error);
// Unblock rendering tiles (even though sprite request has failed).
spriteLoaded = true;
observer->onUpdate();
Copy link
Contributor

Choose a reason for hiding this comment

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

This will only unblock rendering in continuous mode. Still image mode will still fail because the onResourceError terminates the whole map render request.

@tobrun tobrun mentioned this pull request May 9, 2019
Make sure that the `addOnStyleImageMissingListener` callback
is invoked for missing images if sprite request has failed.
@pozdnyakov pozdnyakov force-pushed the mikhail_render_tiles_with_missing_sprites branch from 8d04c3e to e008c93 Compare May 9, 2019 13:16
@pozdnyakov pozdnyakov requested a review from tobrun May 9, 2019 13:18
Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

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

Android test looks good

@pozdnyakov pozdnyakov merged commit 842ee6b into master May 9, 2019
@pozdnyakov pozdnyakov deleted the mikhail_render_tiles_with_missing_sprites branch May 9, 2019 13:48
@chloekraw chloekraw added Core The cross-platform C++ core, aka mbgl bug labels Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tile doesn't render after zoom
5 participants