[iOS][macOS] Add ImageSource bindings

This commit is contained in:
Asheem Mamoowala
2017-05-25 14:36:05 -07:00
parent 7b05606464
commit ab5b310a9e
40 changed files with 788 additions and 39 deletions

View File

@@ -135,12 +135,13 @@ void RenderImageSource::update(Immutable<style::Source::Impl> baseImpl_,
geomCoords.push_back(gc);
}
if (!bucket) {
UnassociatedImage img = impl().getImage().clone();
if (!img.valid()) {
return;
}
bucket = std::make_unique<RasterBucket>(std::move(img));
const UnassociatedImage& image = impl().getImage();
if (!image.valid()) {
return;
}
if (!bucket || image != bucket->image) {
bucket = std::make_unique<RasterBucket>(image.clone());
} else {
bucket->clear();
}